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

foreman-maintain can't restart services when using external DB

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Undefined Undefined
    • None
    • 6.15.2
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • 0
    • Platform
    • None

      Description of problem:

      When satellite is configured to use an external DB, any attempt to restart services using foreman-maintain fails with the error below:

      # foreman-maintain service restart
      Running Restart Services
      ================================================================================
      Check if command is run as root user:                                 [OK]
      --------------------------------------------------------------------------------
      Restart applicable services: Restarting the following service(s):
      redis, postgresql, postgresql (pulpcore), pulpcore-api, pulpcore-content, pulpcore-worker@1.service, pulpcore-worker@2.service, pulpcore-worker@3.service, pulpcore-worker@4.service, pulpcore-worker@5.service, pulpcore-worker@6.service, pulpcore-worker@7.service, pulpcore-worker@8.service, tomcat, dynflow-sidekiq@orchestrator, foreman, httpd, dynflow-sidekiq@worker-1, dynflow-sidekiq@worker-hosts-queue-1, foreman-proxy
      / restarting pulpcore-content#<Thread:0x00005582abb09b80 /usr/share/gems/gems/foreman_maintain-1.4.5/definitions/features/service.rb:94 run> terminated with exception (report_on_exception is true):
      Traceback (most recent call last):
      /usr/share/gems/gems/foreman_maintain-1.4.5/definitions/features/service.rb:94:in `block (2 levels) in fork_threads_for_services': undefined method `restart' for RemoteDB(postgresql:pulpcore [10]):ForemanMaintain::Utils::Service::RemoteDB (NoMethodError)
      Did you mean?  start
      - restarting pulpcore-content                                         [FAIL]    
      undefined method `restart' for RemoteDB(postgresql:pulpcore [10]):ForemanMaintain::Utils::Service::RemoteDB
      Did you mean?  start
      --------------------------------------------------------------------------------
      Scenario [Restart Services] failed.The following steps ended up in failing state:  [service-restart]Resolve the failed steps and rerun the command.If the situation persists and, you are unclear what to do next,
      contact Red Hat Technical Support.In case the failures are false positives, use
      --whitelist="service-restart"
       

      How reproducible:

      Always

      Is this issue a regression from an earlier version:

      Unsure, but I suppose yes.

      Steps to Reproduce:

      1. Configure satellite to use an external DB. In my reproducer I used only pulpcore

      2. try using foreman-maintain to restart services

      3.

      Actual behavior:
      restart fails with an error about "restart" method being undefined

      Expected behavior:
      services to be restarted

      Business Impact / Additional info:

      Workarounds:

      1. Use stop/start instead of restart

      foreman-maintain service stop
      foreman-maintain service start

      2. exclude postgresql from the restart:

      foreman-maintain service restart --exclude=postgresql

       

              Unassigned Unassigned
              rhn-support-jpasqual Joniel Pasqualetto
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: