The KB for NSX Edge node resize tool (VCF deployed NSX environments) - https://knowledge.broadcom.com/external/article/312196/ , is being applied.
During the script implementation we encounter the error "Failed to get Bearer Token!". The error stack looks something like the below -root@sddc-M [/home/vcf]# ./resize.sh --edge-cluster <Edge cluster name> --user <ssoUser> --password <ssoUserPassword> --form-factor LARGE
Resizing Edge nodes in Edge cluster <edge_cluster> to form factor LARGE
The Edge Node Resizer tool takes Edge nodes offline one at a time in orderto recreate them with a specified form factor. This means that
* Each Edge node's Tier-0 interfaces temporarily go offline during resizing* Tier-1 router services relocate from one Edge node to another
This may lead to temporary network traffic interruptions during the resize.The full resize operation may take as long as it did to originally createand (if requested) expand the Edge cluster.
Do you wish to proceed (y/n)? yRun confirmation accepted by user.Getting credentials from SDDC Manager...Getting Bearer tokenFailed to get bearer token!Exception: local variable 'tokenReply' referenced before assignment bt: File "/home/vcf/resizer/resizer/./resize.py", line 1980, in __init__
bt: self._doInit()
bt: File "/home/vcf/resizer/resizer/./resize.py", line 2041, in _doInit bt: self._getServercredentials(ssoPassword) bt: File "/home/vcf/resizer/resizer/./resize.py", line 2138, in _getServerCredentials bt: self.creds = VcfCreds(workload=self.workloadName,
bt: File "/home/vcf/resizer/vcf_utils/vcf_creds.py", line 558, in __init__
bt: self.createAuthToken(username, password)
bt: File "/home/vcf/resizer/vcf_utils/vcf_creds.py", line 104, in _createAuthToken bt: logger.error("Response:\n%s" % pp.pformat(tokenReply))Did not complete requested operation
Resizing utility is stopping now.
VMware Cloud Foundation 4.x
VMware Cloud Foundation 5.x
This issue occurs if the tool is unable to accept the specified SSO password that contains special characters. (Most case scenarios '$'.)
Use quotes to specify the password -
./resize.sh --edge-cluster <Edge cluster name> --user <ssoUser> --password '<ssoUserPassword>' --form-factor <SMALL,MEDIUM,LARGE,XLARGE>
root@sddc-M [/home/vcf]# ./resize.sh --edge-cluster vcf_edge01 --user [email protected] --password 'VMware123$' --form-factor LARGE
OR
Run the command without the password attribute, which will then request the user to enter the password manually during the script execution -
./resize.sh --edge-cluster <Edge cluster name> --user <ssoUser> --form-factor <SMALL,MEDIUM,LARGE,XLARGE>
root@sddc-M [/home/vcf]# ./resize.sh --edge-cluster vcf_edge01 --user [email protected] --form-factor LARGE