virgo-agent-toolkit / rackspace-monitoring-agent

Rackspace Cloud Monitoring Agent
http://virgoagent.com/rackspace-monitoring-agent/
Apache License 2.0
118 stars 39 forks source link

Removed explicit DEB dependency on xenstore-utils package #982

Closed itzg closed 4 years ago

itzg commented 4 years ago

For https://jira.rax.io/browse/CMC-2295 we need to remove the explicit dependency on the xenstore-utils package so that the VM setup has the option to provide xenstore-read from newer packages, such as xe-guest-utilities.

itzg commented 4 years ago

Do we know what will happen now if xenstore-read is not available?

The call failure seems to be caught here

https://github.com/virgo-agent-toolkit/virgo-base-agent/blob/95ced24e513d683509dd7a0910a4f0e0ce0c1b2c/machineidentity.lua#L58

From there I would hope the agent startup would terminate since that is the last machine identity schema that seems to be used.

itzg commented 4 years ago

@jjbuchan ...your question got me thinking if we could/should declare the alternative package dependencies and that does seem to be supported

https://www.debian.org/doc/debian-policy/ch-relationships.html

I'll check with Brian if that would be acceptable.

itzg commented 4 years ago

@jjbuchan ...your question got me thinking if we could/should declare the alternative package dependencies and that does seem to be supported

https://www.debian.org/doc/debian-policy/ch-relationships.html

I'll check with Brian if that would be acceptable.

@jjbuchan as we saw in email:

Removing it all together would make sure this doesn't happen again or require another change in the future. In theory your suggestion should work. Note that xen-utilitues does not have xe-linux-distribution. Only xe-guest-utilities has that script.

So I reverted the change to declare alternate package dependencies and left it without being explicitly declared.

jjbuchan commented 4 years ago

For future people.

We've decided to remove the dependency instead of using SET(CPACK_DEBIAN_PACKAGE_DEPENDS "xenstore-utils (>= 4.4.2-0) | xe-guest-utilities") because this agent should be allowed to be installed on any debian system. The xen commands are most important for cloud servers but you should be able to install it on a dedicated account or your own home debian server if you wish.

Without the dependency in there it means cloud devices in Rackspace Monitoring may fail to attach to their expected entity if xenstore-read is missing. However, an error in the log messages should be present explaining that the command is missing and therefore the xen-id could not be retrieved.