fence_azure_arm fails with ServicePrincipalCredentials' object has no attribute 'get_token'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
fence-agents (Ubuntu) |
Fix Released
|
Undecided
|
Robie Basak | ||
Jammy |
Fix Released
|
Undecided
|
Robie Basak | ||
Kinetic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
The Azure-specific fence agent fence_azure_arm does not work at all on Jammy. It's needed for HA fencing on Azure.
[Test Plan A]
Follow Steps 1 through 3 for Focal at https:/
Once the fence agent resource is configured, "sudo crm status" should produce output as described in the tutorial. Then run "iptables -I INPUT -j DROP" on vm2. This will of course lock you out, but shortly afterwards, vm2 get rebooted automatically by one of the other nodes, as can be verified by seeing the contents of /proc/sys/
In the failure case, "sudo crm status" will display output like the following, and of course no reboot occurs:
Node List:
* Node myVM2: UNCLEAN (offline)
* Online: [ myVM1 myVM3 ]
Full List of Resources:
* fence-vm (stonith:
Failed Resource Actions:
* fence-vm start on myVM1 returned 'error' at Thu Nov 17 14:48:04 2022 after 3.388s
* fence-vm start on myVM3 returned 'error' at Thu Nov 17 14:48:11 2022 after 2.193s
Failed Fencing Actions:
* reboot of myVM2 failed: delegate=, client=
[Test Plan B]
Instead of configuring pacemaker with the fence agent and causing it to detect and take the fencing action by using iptables to fake a loss of network connectivity, it's possible to run the fence agent manually as follows:
fence_azure_arm --action=reboot --plug=myVM2 --resourceGroup
This prints lots of debug output, exits 0 and should cause a reboot of vm2. In the failure case, it exits non-zero with "AttributeError: 'ServicePrincip
[Where problems could occur]
We're changing code that is only used by Azure-specific fence agents, which we believe is fence_azure_arm only.
There could be some way that users are successfully using fence_azure_arm today that we don't know about, and this change could then regress these users. But as far as we're aware, the requirement to use the new API is a hard requirement for this version of python3-azure.
There could be a further bug in an area not exercised by the Test Plan which would be harder to fix in a further SRU without affecting existing users, after this SRU makes it work.
There's the usual "rebuild risk" that could cause a behaviour change in an area of code we haven't touched.
[Other Info]
There seems to be a different bug on Lunar that prevents Test Plan A from succeeding. However, Test Plan B passes, verifying that this bug is fixed on Lunar. The other bug appears to be in crmsh and I'll tackle that separately.
Based on the presence of the required changes, this bug is presumed fixed on Kinetic, but it doesn't seem important to spend time verifying this on Kinetic for this bug since I don't expect anyone to be using Kinetic on Azure with HA.
I've built this proposed SRU in ppa:racb/
[Original Description]
ubuntu server 22.04
installed python3-azure and fence-agents*
stonith device will not start. when running fence_azure_arm fails with this error-
# fence_azure_arm -l xxxx -p "xxxx" --resourceGroup
2022-09-20 16:22:14,713 ERROR: Failed: 'ServicePrincip
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: fence-agents 4.7.1-1ubuntu8
ProcVersionSign
Uname: Linux 5.15.0-1019-azure x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckR
Date: Tue Sep 20 16:49:42 2022
PackageArchitec
ProcEnviron:
SHELL=/bin/bash
LANG=C.UTF-8
TERM=xterm-
XDG_RUNTIME_
PATH=(custom, no user)
SourcePackage: fence-agents
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- git-ubuntu bot: Approve
- Lucas Kanashiro (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 124 lines (+103/-0)3 files modifieddebian/changelog (+8/-0)
debian/patches/azure-sdk-15 (+94/-0)
debian/patches/series (+1/-0)
tags: | added: server-todo |
Changed in fence-agents (Ubuntu): | |
assignee: | nobody → Robie Basak (racb) |
description: | updated |
tags: |
added: verification-done verification-done-jammy removed: verification-needed verification-needed-jammy |
I was able to get it working by installing fence-agents-4.11 from Debian. http.us. debian. org/debian/ pool/main/ f/fence- agents/ fence-agents_ 4.11.0- 1+b1_amd64. deb
http://
seems included version 4.7 is not compatible with the included python3-azure SDK