Closed NucciTheBoss closed 1 year ago
BAH - integration tests need to be updated since service_start(...)
, service_stop(...)
, etc no longer return boolean values.
Latest integration test failure seems to be a timeout failure with the snap charm library. Looks like it times out waiting for LXD to stop.
Looks good to me! Just one nit comment, but approving.
Awesome, I responded to your review comment. Let me bump the LIBPATCH version of the systemd charm library and we should be good to merge!
Hello - this pull request extends the service methods in the systemd charm library to now accept multiple arguments. I made this change so that when charm authors need to pass extra parameters to
systemctl
, they do not need to directly call the private_systemctl
method and can instead pass the extra arguments to via the publicservice_*
methods.For example, say you have a service that takes several seconds to start. Using
service_start(...)
in its currently implementation will cause Python to block until systemctl returns an exit code (Popen.wait()
). This is inconvenient especially if you have a service that could take 30+ seconds to start. With the implementation this pull request proposes, you can pass the--no-block
option toservice_start(...)
and let the charm continue on its way while the systemd starts the service in the background.Notes
_systemctl(...)
. It is now similar to how_dnf(...)
is implemented in the dnf charmlib.