[juju] Fix juju agent introspect commands#4013
Conversation
|
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
1 similar comment
|
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
|
seems like fedora 40 went EoL, this now depends on #4014 being merged |
721c0cc to
0a62c4e
Compare
0a62c4e to
e735b9b
Compare
|
/packit rebuild-failed |
| 'juju_engine_report', | ||
| 'juju_goroutines', | ||
| 'juju_heap_profile', | ||
| 'juju_leases', |
There was a problem hiding this comment.
You stop collecting this, is it intentional?
There was a problem hiding this comment.
The juju_leases alias doesn't exist anymore, plus it was very complex to bring it here in sos.
As this portion didn't work, it doesn't make much of a difference to actually remove it.
| def _juju_agent(self, command): | ||
| agent_name = "" | ||
| for dir_name in self.listdir("/var/lib/juju/agents"): | ||
| if re.search('machine-*|controller-*|application-*', dir_name): | ||
| agent_name = dir_name | ||
| break | ||
|
|
||
| return f"juju-introspect --agent={agent_name} {command}" |
There was a problem hiding this comment.
Isnt it faster to store the agent_name in a variable and use it statically? Currently you call this method once for each juju_agents_cmds while you get a static info that can be fetched just once.
Or do I miss something?
There was a problem hiding this comment.
yup, good catch, was trying to mimic a different version of the same thing and didn't really think about it too much. I'll get that updated
By default the introspect commands are aliases in the bash login profile, so these won't be available via sos. This extraplotes the commands that are available and passes it to juju-introspect. Signed-off-by: Arif Ali <arif.ali@canonical.com>
e735b9b to
4bad2e4
Compare
By default the introspect commands are aliases in the bash login profile, so these won't be available via sos. This extraplotes the commands that are available and passes it to juju-introspect.
Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines