I'm getting an error about the $realm value not being initialized when trying to authenticate with the API. This is for a packer build, and I was able to build without any errors previously. The full error from the syslog is as follow:
The above is my most recent attempt using a newly generated API token. I've created multiple new tokens, even had one for root@pam user. Each attempt, I still get the same error message about the uninitialized value, followed by the user name not looking valid. Looking into the source code, I can see where the AccessControl calls for Auth/Plugin.pm. Here's the regex that it's using:
I know I messed something up. I tried to pass the motherboard's SATA controller to a VM, which locked everything up (lesson learned). Attempts to do anything in the GUI received errors about a read only file system. Wasn't even able to get into the CLI to issue a shutdown command. Had to pull the plug. When I powered it back up, all the VMs started up without any errors, so I thought no harm done. Until I tried to do a new packer build and received the error. I'm sure something got corrupted in the system somewhere as a result of my actions. I'd like to see if it can be fixed before I resort to wiping the system and do a rebuild.
Jan 20 11:08:49 pve pvedaemon[1600468]: Use of uninitialized value $realm in hash element at /usr/share/perl5/PVE/AccessControl.pm line 1171.
Jan 20 11:08:49 pve pvedaemon[1600468]: authentication failure; rhost=::ffff:10.0.42.36 user=jheady@pve!packer msg=value 'jheady@pve!packer' does not look like a valid user name
The above is my most recent attempt using a newly generated API token. I've created multiple new tokens, even had one for root@pam user. Each attempt, I still get the same error message about the uninitialized value, followed by the user name not looking valid. Looking into the source code, I can see where the AccessControl calls for Auth/Plugin.pm. Here's the regex that it's using:
our $realm_regex = qr/[A-Za-z][A-Za-z0-9\.\-_]+/;
our $user_regex = qr![^\s:/]+!;
I know I messed something up. I tried to pass the motherboard's SATA controller to a VM, which locked everything up (lesson learned). Attempts to do anything in the GUI received errors about a read only file system. Wasn't even able to get into the CLI to issue a shutdown command. Had to pull the plug. When I powered it back up, all the VMs started up without any errors, so I thought no harm done. Until I tried to do a new packer build and received the error. I'm sure something got corrupted in the system somewhere as a result of my actions. I'd like to see if it can be fixed before I resort to wiping the system and do a rebuild.