[foreman*|pulp|candlepin] support foremanctl deployments#4330
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. |
add_cmd_output / exec_cmd / .. methods newly accepts stdin argument, to pass stdin to various commands. Adding some unit tests to verify the feature. Relevant: sosreport#4189 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
foremanctl deployments are container based, so collect data from the pods. Also, drop collecting some abandoned stuff not further applicable even to standalone deployments. Relevant: sosreport#4189 Closes: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
06c9cd0 to
186dd5e
Compare
foremanctl deployments are container based, so collect data from the pods. Also, drop collecting some abandoned stuff not further applicable even to standalone deployments. Relevant: sosreport#4189 Closes: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
186dd5e to
79122fb
Compare
foremanctl deployments are container based, so collect data from the pods. Also, drop collecting some abandoned stuff not further applicable even to standalone deployments. Relevant: sosreport#4189 Closes: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
79122fb to
6608734
Compare
New plugin for foreman deployments using podman and ansible. Relevant: sosreport#4189 Closes: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
foremanctl deployments are container based, so collect data from the pods. Also, drop collecting some abandoned stuff not further applicable even to standalone deployments. Relevant: sosreport#4189 Closes: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
New plugin for foreman deployments using podman and ansible. Relevant: sosreport#4189 Closes: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
62f2bda to
c86220b
Compare
foremanctl deployments are container based, so collect data from the pods. Also, drop collecting some abandoned stuff not further applicable even to standalone deployments. Relevant: sosreport#4189 Closes: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
New plugin for foreman deployments using podman and ansible. Relevant: sosreport#4189 Closes: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
c86220b to
a5fcbe0
Compare
foremanctl deployments are container based, so collect data from the pods. Also, drop collecting some abandoned stuff not further applicable even to standalone deployments. Relevant: sosreport#4189 Closes: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
New plugin for foreman deployments using podman and ansible. Relevant: sosreport#4189 Closes: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
a5fcbe0 to
b8083e6
Compare
| 'ping -c1 -W1 localhost' | ||
| ]) | ||
|
|
||
| self.add_journal(units="foreman.service", sizelimit=500) |
There was a problem hiding this comment.
Ideally also all of these
# systemctl list-units | grep dynflow-sidekiq@ | awk '{ print $1 }'
dynflow-sidekiq@orchestrator.service
dynflow-sidekiq@worker-hosts-queue.service
dynflow-sidekiq@worker.service
Or maybe even better, logs of all the services forming foreman.target?
# systemctl list-dependencies foreman.target | grep -Po '[a-zA-Z].*'
foreman.target
candlepin.service
dynflow-sidekiq@orchestrator.service
dynflow-sidekiq@worker-hosts-queue.service
dynflow-sidekiq@worker.service
foreman-proxy.service
foreman-recurring@daily.service
foreman-recurring@daily.timer
foreman-recurring@hourly.service
foreman-recurring@hourly.timer
foreman-recurring@monthly.service
foreman-recurring@monthly.timer
foreman-recurring@weekly.service
foreman-recurring@weekly.timer
foreman.service
postgresql.service
pulp-api.service
pulp-content.service
pulp-worker@1.service
pulp-worker@2.service
pulp-worker@3.service
pulp-worker@4.service
pulp-worker@5.service
pulp-worker@6.service
redis.service
pulp-worker.target
pulp-worker@1.service
pulp-worker@2.service
pulp-worker@3.service
pulp-worker@4.service
pulp-worker@5.service
pulp-worker@6.service
There was a problem hiding this comment.
We collect self.add_journal(units="dynflow-sidekiq@*") on line 179. candlepin, foreman-* and pulp-* shall be rather collected by the respective plugins (so I will extend the foreman_proxy one, candlepin and pulp is on the TODO list).
both redis and postgresql journals make sense to collect only in foremanctl, right? It makes bit more sense to collect them in foreman plugin as a special use case, since redis and postgresql plugins dont collect the journals by default.
| cmdout = self.exec_cmd( | ||
| _cmd, timeout=600, sizelimit=100, | ||
| env=self.env, container=self.dbcontainer) | ||
| self.add_cmd_output( | ||
| 'podman exec -i foreman /usr/libexec/dynflow-expand', | ||
| suggest_filename=dyn, | ||
| timeout=600, | ||
| stdin=cmdout['output'], | ||
| ) |
There was a problem hiding this comment.
Would it be possible to pipe the two together in one go? I'm pretty sure it could be done in a hack way, this question is more about doing it cleanly.
There was a problem hiding this comment.
@TurboTurtle some thoughts? I know there are some know issues when collecting commands with pipes, so we try to avoid that as much as we can.
Moreover, plain:
self.add_cmd_output(f'podman exec postgresql {_cmd} | podman exec -i foreman /usr/libexec/dynflow-expand', env=self.env,suggest_filename=f'piped_{dyn}', timeout=600)
does not work (psql: invalid option -- 'i'), regardless if I add - to tail of the 2nd podman command, and:
podman exec -i foreman /usr/libexec/dynflow-expand < <(podman exec postgresql {_cmd})
gets stuck.
I dont like the proposed approach, but dont see anything better (that would work).
foremanctl deployments are container based, so collect data from the pods. Also, drop collecting some abandoned stuff not further applicable even to standalone deployments. Relevant: sosreport#4189 Closes: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
New plugin for foreman deployments using podman and ansible. Relevant: sosreport#4189 Closes: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
b8083e6 to
5c3cf37
Compare
foremanctl deployments are container based, so collect data from the pods. Also, drop collecting some abandoned stuff not further applicable even to standalone deployments. Relevant: sosreport#4189 Closes: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
New plugin for foreman deployments using podman and ansible. Relevant: sosreport#4189 Closes: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
5c3cf37 to
3c86d48
Compare
Useful mainly for foremanctl deployments Relevant: sosreport#4189 Signed-off by: Barbora Vassova <bvassova@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
3c86d48 to
4bc5689
Compare
Plugin.add_cmd_output run with container and env args should pass the env into container OS environ. Relevant: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Changes applied: - uploaddir default value valid also for non-foremanctl deployments - plugin trigger enahnced by foremanctl related pods - foremanctl moved config from settings.py to pods config - collect proper commands from proper pod Related: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Plugin.add_cmd_output run with container and env args should pass the env into container OS environ. Relevant: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Changes applied: - uploaddir default value valid also for non-foremanctl deployments - plugin trigger enahnced by foremanctl related pods - foremanctl moved config from settings.py to pods config - collect proper commands from proper pod Related: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
7a0eab6 to
ba02cbe
Compare
Two issues fixed for systems with postgres in containers managed by same-named service (like foremanctl deployments): - Add 'postgresql' service trigger. - Break wrong inheritance of classes, where RHELPolicy allowing IndependentPlugin and RedHatPlugin can cause DebianPostgreSQL is used via common IndependentPlugin subclass. Splitting RedHatPostgreSQL is a solution here. Relevant: sosreport#4330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Relevant: sosreport#4330 Signed-off-by: Barbora Vassova <bvassova@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
Kindly asking @arif-ali and/or @TurboTurtle for a review - I would like to fix this regression till the next release scheduled for the next week. |
A merge-able implementation of #4189. When reviewing all stuff being collected in
foremanplugin, I did remove some parts that are not further relevant (passenger, qpid).I am kindy asking @evgeni / @adamruzicka / @ehelms for a review of the
TODOquestions as I dont know how (or if) to collect some stuff.All other plugin changes (pulp, candlepin,..) included, as well as a new
foremanctlplugin is implemented.Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines