Metadata doesnt override username
Hello everyone,
I've patched my proxmox to create a metadata file that can be read by cloudbase-init. It works fine for the hostname, uuid, password etc.
But cloudbase never overrides the conf username by username given by metadata.
The variable i generate is "adminusername", i've checked in the getadmin_username definition on the python modules in the cloudbase and it is the variable it looks for. (i even tried just username, it didnt work).
Cloudbase at boot always uses the conf.username and when i delete username from the conf file it uses default username which is Admin.
This is the part of the creatuser module where it gets the username;
def execute(self, service, shared_data):
user_name = service.get_admin_username() or CONF.username
shared_data[constants.SHARED_DATA_USERNAME] = user_name
the called service.getadminusername() is ;
def get_admin_username(self):
return self._get_meta_data().get('meta', {}).get('admin_username')