spacewalk-schema-update appears to hang when dropping and adding index

  • 7024167
  • 03-Oct-2019
  • 03-Oct-2019

Environment

SUSE Manager 3.2

Situation

Need to run spacewalk-schema-update after a SUSE Manager update but the process appears to get stuck/hang.

Viewing the log file (name is displayed on screen) shows something smilar to:


DROP INDEX IF EXISTS suse_salt_event_minion_id_idx;

CREATE INDEX IF NOT EXISTS suse_salt_event_minion_id_idx
  ON suseSaltEvent (minion_id NULLS FIRST, id);
    commit;


'Top' output shows no activity that would suggest the database is busy or that the schema is being altered.

No errors are observed in any logs.




Resolution

Execute 'spacewalk service stop' before trying to run 'spacewalk-schema-update'.

If the problem persists, some of the services may have failed to stop or may be in a hung state.

Check services have stopped using 'spacewalk service status'.   Individual services can be checked using :  e.g.  'rctomcat status'

Stop any processes which may have a lock on any part of the database:

e.g.
     rctomcat stop
     rcsalt-master stop


You may need to stop spacewalk-schema-update and restart it once the blocking process has been stopped.

Don't forget to restart stopped processes after the schema update is complete (or reboot).

Cause

'spacewalk-service stop' had not been executed prior to running 'spacewalk-schema-update'. Tomcat had access to the SUSE Manager database and was preventing sql code from executing one or more steps.

Feedback service temporarily unavailable. For content questions or problems, please contact Support.