kolesa-team / pve-purestorage-plugin

MIT License
5 stars 6 forks source link

Session to PURE API get invalid during PVE integrated backup #24

Closed cbka closed 3 weeks ago

cbka commented 3 weeks ago
ERROR: Backup of VM 109 failed - Error :: PureStorage API :: Failed to modify connection.
ERROR: => Trace:
ERROR: ==> Code: 401
ERROR: ==> Message: {"errors" => [{"message" => "Invalid session.","location_context" => {"name" => "ka-rz1-arr-1","id" => undef,"resource_type" => "remote-arrays"}}]} at /usr/share/perl5/PVE/Storage/Custom/PureStoragePlugin.pm line 380.

also:

ERROR: Backup of VM 110 failed - Error :: PureStorage API :: Failed to modify connection.
ERROR: => Trace:
ERROR: ==> Code: 401
ERROR: ==> Message: {"errors" => [{"location_context" => {"name" => "ka-rz1-arr-1","resource_type" => "remote-arrays","id" => undef},"message" => "Invalid session."}]} at /usr/share/perl5/PVE/Storage/Custom/PureStoragePlugin.pm line 380.
INFO: Failed at 2025-01-23 01:21:10
cbka commented 3 weeks ago

looks like the auth is not valid anymore. so maybe checking / renewing it before accessing api endpoints would be good

cbka commented 3 weeks ago

another error:

ERROR: Backup of VM 175 failed - Error :: PureStorage API :: List volumes status failed.
ERROR: => Trace:
ERROR: ==> Code: 401
ERROR: ==> Message: {"errors" => [{"message" => "Invalid session.","location_context" => {"name" => "ka-rz1-arr-1","id" => undef,"resource_type" => "remote-arrays"}}]} at /usr/share/perl5/PVE/Storage/Custom/PureStoragePlugin.pm line 280.
cbka commented 3 weeks ago

it seems like the auth_token is only receiver once and due to the time the backup takes gets invalid ...

timansky commented 3 weeks ago

Please try this fix?

cbka commented 3 weeks ago

testing...

amulet1 commented 3 weeks ago

I do not think retrying can possibly help here. Probably the token supplied in storage.cfg has expired.

cbka commented 3 weeks ago

@amulet1 well, the Token in the config is not the x auth Token Provided After Post-Login

cbka commented 3 weeks ago

fix resolves timeout error pls push to main @timansky

cbka commented 3 weeks ago
INFO: include disk 'scsi0' 'ka-rz1-arr-1-iscsi-plugin:vm-126-disk-0' 200G
INFO: include disk 'scsi1' 'ka-rz1-arr-1-iscsi-plugin:vm-126-disk-1' 4101M
Error :: Invalid session. Retrying... Attempt: 2
Info :: Volume "ka-rz1-pve-cluster/vm-126-disk-0" was already added to host "pve01".
wwid '3624a9370acbf05bb9dd74c2700011420' added
amulet1 commented 2 weeks ago

@amulet1 well, the Token in the config is not the x auth Token Provided After Post-Login

Correct - the session token expired.