Expired MGMT_CLUSTER Certificate on the LM nodes cannot be deleted using the CARR script
VMware NSX
CARR script is unable to release an expired certificate from the NSX manager due to the presence of the wild card such as "/n" in the node id
The following errors are printed in the CARR logs
025-09-18 14:08:04,282 - carr.recovery.stale_certs_removal_task - MainThread - ERROR - stale_certs_removal_task.py:72 - Failed to release stale certificate: 9b330fa1-####-458e-####-################. Some issue.Traceback (most recent call last): File "/Users/sosam3m/.virtualenvs/carr_script/lib/python3.9/site-packages/carr/interface/rest/base_api.py", line 127, in invoke resp.raise_for_status() File "/Users/sosam3m/.virtualenvs/carr_script/lib/python3.9/site-packages/requests/models.py", line 1024, in raise_for_status raise HTTPError(http_error_msg, response=self)
From the further investigation of the logs we determined that the node id for the MGMT-VIP was as follows
[payload message]managed_resource { display_name: "mp-cluster certificate for node <NSX manager FQDN>"}pem_encoding: "-----BEGIN CERTIFICATE-----\nMIIDsj###C###C###A###p###q###g###A###w###I###B###A###g###I###E###Z###Y###l###X###h###D###A###N###B###g###k###q###h###k###i###G###9###w###0###B###A###Q###s###F###A###D###B###y###M###Q###s###w###C###Q###Y###D###V###Q###Q###G###E###w###J###V###U###z###E###L###M###A###k###G###A###1###U###E###C###B###M###C###Q###0###E###x###E###j###A###Q###B###g###N###V###B###A###c###T###C###V###B###h###b###G###8###g###Q###W###x###0###b###z###E###U###M###B###I###G###A###1###U###E###C###h###M###L###V###k###1###3###Y###X###J###l###I###E###l###u###Y###y###4###x###D###D###A###K###B###g###N###V###B###A###s###T###A###0###5###T###W###D###E###e###M###B###w###G###A###1###U###E###A###x###M###V###Z###X###J###n###c###2###R###w###b###n###N###4###b###G###0###w###M###S###1###j###b###H###V###z###d###G###V###y###M###B###4###X###D###T###I###y###M###D###g###w###M###z###A###z###N###D###E###z###M###F###o###X###D###T###I###0###M###T###E###w###N###T###A###z###N###D###E###z###M###F###o###w###c###j###E###L###M###A###k###G###A###1###U###E###B###h###M###C###V###V###M###x###C###z###A###J###B###g###N###V###B###A###g###T###A###k###N###B###M###R###I###w###E###A###Y###D###V###Q###Q###H###E###w###l###Q###Y###W###x###v###I###E###F###s###d###G###8###x###F###D###A###S###B###g###N###V###B###A###o###T###C###1###Z###N###d###2###F###y###Z###S###B###J###b###m###M###u###M###Q###w###w###C###g###Y###D###V###Q###Q###L###E###w###N###O###U###1###g###x###H###j###A###c###B###g###N###V###B###A###M###T###F###W###V###y###Z###3###N###k###c###G###5###z###e###G###x###t###M###D###E###t###Y###2###x###1###c###3###R###l###c###j###C###C###A###S###I###w###D###Q###Y###J###K###o###Z###I###h###v###c###N###A###Q###E###B###B###Q###A###D###g###g###E###P###A###D###C###C###A###Q###o###C###g###g###E###B###A###L###Q###s###T###8###5###B###q###z###U###2###G###3###w###i###c###9###j###q###U###g###s###g###p###1###2###l###M###P###r###Y###F###4###y###z###i###r###G###d###D###D###n###3###J###2###x###b###Q###L###2###4###y###v###a###p###I###x###5###Q###Z###A###I###y###6###y###z###c###7###F###Q###p###/###9###G###y###T###u###S###z###i###I###g###l###e###h###n###t###F###w###Z###m###m###d###P###b###9###4###f###Z###m###T###U###C###t###Y###R###S###I###9###o###c###X###g###B###Z###b###y###W###u###X###B###Y###5###i###x###v###2###J###9###i###P###A###I###5###F###l###C###O###F###z###v###Z###V###0###i###6###/###M###B###L###V###n###A###N###i###0###L###l###e###R###P###m###7###p###s###P###8###y###r###w###a###Q###t###z###N###B###6###l###9###S###8###i###f###p###b###W###6###b###R###F###+###N###s###U###A###w###p###p###d###s###g###d###i###S###+###l###2###A###F###A###J###d###i###t###5###f###U###0###3###0###n###w###P###r###4###A###6###C###H###8###L###F###5###b###N###c###E###S###g###Y###W###9###O###8###g###U###t###0###7###h###w###C###E###O###V###S###N###E###k###I###e###S###T###7###U###P###e###W###n###k###5###Q###i###/###E###S###2###B###w###0###4###/###L###/###D###R###x###P###U###o###F###x###o###1###J###A###2###1###z###v###N###N###R###V###N###p###I###T###M###H###f###k###1###J###4###5###+###I###X###k###r###d###m###A###P###h###8###P###f###Q###J###R###v###O###p###b###o###/###e###A###n###0###C###A###w###E###A###A###a###N###Q###M###E###4###w###E###w###Y###D###V###R###0###l###B###A###w###w###C###g###Y###I###K###w###Y###B###B###Q###U###H###A###w###E###w###G###A###Y###D###V###R###0###R###B###B###E###w###D###4###I###N###Z###X###J###n###c###2###R###w###b###n###N###4###b###G###0###w###M###T###A###d###B###g###N###V###H###Q###4###E###F###g###Q###U###p###p###b###G###L###w###h###3###x###l###o###5###W###b###O###k###F###6###3###d###s###G###s###2###J###M###Y###w###D###Q###Y###J###K###o###Z###I###h###v###c###N###A###Q###E###L###B###Q###A###D###g###g###E###B###A###I###j###L###P###r###0###w###p###B###A###o###k###x###6###4###b###U###o###o###e###a###h###C###C###p###8###A###j###k###d###F###P###0###F###/###f###1###A###x###v###v###3###1###M###j###t###6###l###t###V###j###2###e###g###g###5###2###5###w###E###W###3###4###4###9###2###7###k###H###g###F###B###S###0###n###A###R###k###l###y###A###Y###p###v###q###A###h###4###X###h###P###g###A###h###0###w###9###m###H###U###D###X###B###/###O###N###v###7###d###+###h###M###6###i###m###0###z###5###Z###d###b###5###v###P###i###+###O###9###A###n###p###s###l###c###j###0###z###o###H###C###2###i###h###S###W###W###k###F###4###s###n###L###3###Q###f###U###0###1###/###o###m###l###s###U###n###+###F###l###G###X###+###R###g###w###y###z###F###8###A###k###c###r###n###W###F###s###z###b###N###0###2###T###v###C###V###u###S###l###/###s###U###w###W###Q###R###1###8###X###e###m###L###w###5###s###O###/###/###/###Q###a###l###2###+###g###Y###O###j###S###a###U###7###1###8###A###G###K###t###P###J###f###D###m###7###D###i###r###T###H###w###O###x###k###x###d###N###L###J###i###y###L###N###m###L###9###m###8###7###d###e###6###9###F###+###4###g###k###F###8###X###4###Q###z###k###5###8###o###D###X###x###D###z###c###G###8###G###s###z###7###f###a###l###2###+###p###w###t###M###6###h###f###3###N###E###V###N###P###U###2###R###+###N###6###F###6###w###c###i###D###Q###+###b###J###Uja9br9h+M=\n-----END CERTIFICATE-----"encrypted_pk: <REDACTED>common_name: "#############-cluster"trust_object_type: "certificate_self_signed"used_by { node_id: "########-1538-####-b47e-############\n" type: "MGMT_CLUSTER"}
The node id highlighted in the above log entries has a special character "\n" which prevents the certificate from being released
If the above entries are identified log named carr.log which is created in the folder where the start.sh script is located (refer kb: https://knowledge.broadcom.com/external/article?articleId=369034 for information on how to use the CARR script) open a support request with Broadcom Support
Collect the following information while opening a support request