Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-18327

No simple way to manage pulpcore-worker@*.service instances via foreman-maintain

XMLWordPrintable

    • Moderate
    • None

      Description of problem:
      User story "I want to restart pulpcore-worker services" can't be easily managed via foreman-maintain. In systemd, I just write:

      systemctl restart pulpcore-worker@*.service

      but this does not match anything in foreman-maintain:

      satellite-maintain service restart --only=pulpcore-worker@*.service
      Running Restart Services
      ================================================================================
      Check if command is run as root user: [OK]
      --------------------------------------------------------------------------------
      Restart applicable services:

      Stopping the following service(s): [FAIL]
      No services found matching your parameters
      ..

      Yes, I can provide a list of individual services, like:

      satellite-maintain service restart --only=pulpcore-worker@1.service,pulpcore-worker@2.service

      but that 1) assumes I know what the actual number of workers is, 2) is over-descriptive and error-prone.

      The same applies also to dynflow workers, not only pulpcore workers.

      foreman-maintain should support the '*' expansion like systemd does.

      Version-Release number of selected component (if applicable):
      Sat6.12 beta

      How reproducible:
      100%

      Steps to Reproduce:
      1.
      satellite-maintain service restart --only=pulpcore-worker@*.service
      satellite-maintain service restart --only=dynflow-sidekiq@*.service

      Actual results:
      Failure like above.

      Expected results:
      All worker services are restarted.

      Additional info:
      I tried to enhance the check at https://github.com/theforeman/foreman_maintain/blob/cf77d64a998b501f685688a5b048ef5925a9c9d6/lib/foreman_maintain/utils/service/abstract.rb#L32 but have not succeeded.

              ehelms@redhat.com Eric Helms
              rhn-support-pmoravec Pavel Moravec
              Griffin Sullivan Griffin Sullivan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: