vcenter.yaml not being created due to possible vcenter_registration metadata bug
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MAAS | Status tracked in 3.6 | |||||
3.5 |
Won't Fix
|
Medium
|
Unassigned | |||
3.6 |
Triaged
|
Medium
|
Unassigned |
Bug Description
I am running MAAS: `3.1.0`
I want to start this out by saying that i'm not 100% sure that this is a bug, but after the troubleshooting i've done, I believe it is one. For completeness, I opened this yesterday https:/
The issue I am having is that my esxi deployments are not being joined to vcenter. They are successfully completing deployments in MAAS, but fail to join vcenter even though I have vcenter hostname and creds specified in the MAAS settings which I believe *should* cause the metadata script `vendor_data.py` to write a vcenter.yaml file to `/altbookbank/
I added some additional logging to the `vendor_data.py` script and confirmed that the `vcenter_
*NOTE:* The additional debug logging statements I added are printing to stdout which seems to print out in the regiond logs. Any statement I added will be prefaced with `GSPTEST` - Here is an example from regiond (these are in the tar.gz logs i'm uploading as well):
```
2022-07-20 15:18:05 stdout: [info] GSPTEST: Starting generate_
2022-07-20 15:18:05 stdout: [info] GSPTEST: confirmed we are admin
2022-07-20 15:18:05 stdout: [info] GSPTEST: vcenter_
```
In the code it looks like the `vcenter_
As an additional bit of info, when searching around before opening this bug I discovered this issue which seems to have the same behavior I am experiencing. If vcenter.yaml fails to get created (and creds aren't hard coded into the `vcenter` script built into the image), the `vcenter` script will fail as it has no config file to get certain arguments such as `vc_server`, `vc_username`, `vc_password` and fail completely with `vcenter: error: the following fields are missing: vc_server, vc_username, vc_password` - https:/
I will continue do some more testing and report back any findings. I don't want to permanently rip out the `vcenter_
#############
EDIT 1: I edited the code a bit to have the `config` variable (here: https:/
2022-07-21 14:15:27 stdout: [info] GSPTEST: Starting generate_
2022-07-21 14:15:27 stdout: [info] GSPTEST: confirmed we are admin
2022-07-21 14:15:27 stdout: [info] GSPTEST: vcenter_
2022-07-21 14:15:27 stdout: [info] GSPTEST: configs is: {'vcenter_server': 'vcenter.
#############
EDIT 2: Doing a bit more digging on this and was able to track down the proper postgres DB table the metadata is stored in and was able to manually create the `vcenter_
Example:
```
maasdb=# INSERT INTO maasserver_
maasdb-# VALUES ("2022-07-22 16:09:19.
```
Deployments are joining to vcenter via parameters supplied through vcenter.yaml as expected now!
#############
EDIT 3: This will likely be my final edit to this post. I have discovered that the `vcenter_
You can see various pieces of metadata that are passable here, via the GUI. But you will not find vcenter_
As an interesting bit if information I found that if you deploy a MAAS node using the CLI and passing the `vcenter_
Due to these findings I don't think this is a bug but rather a poorly documented feature. It was not clear to me that this could not be done via the GUI and only after reverse engineering the code a bit was I able to test and confirm this.
description: | updated |
description: | updated |
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → Medium |
description: | updated |
description: | updated |
description: | updated |
Changed in maas: | |
milestone: | 3.5.0 → 3.5.x |
It looks like the GUI does not offer any means of passing the `vcenter_ registration= true` option during machine deployment. It is also likely that MAAS does not remove that option when releasing the machine.