Spaceman1984 commented on issue #3973: systemd dependency on db
URL: https://github.com/apache/cloudstack/pull/3973#issuecomment-601586004
 
 
   I edited the cloudstack-management.service file:
   ```
   [Unit]
   Description=CloudStack Management Server
   After=syslog.target network.target mysqld.service
   Wants=mysqld.service
   ```
   and ran
   
   `systemctl start cloudstack-management`
   
   In this case, mysqld started before cloudstack-management, but after 
executing:
   
   `systemctl stop mysqld`
   
   to see what happens when mysqld is stopped, cloudstack-management didn't 
stop and started throwing errors.
   
   By chaning the cloudstack-management.service file to:
   ```
   [Unit]
   Description=CloudStack Management Server
   After=syslog.target network.target mysqld.service
   Requires=mysqld.service
   ```
   and executing
   
   `systemctl stop mysqld`
   
   cloudstack was stopped first before mysql was stopped.
   
   By my testing, using "Wants", instead of "Requires", mysqld will start 
before cloudstack-management, but will not shut down cloudstack-management 
before mysqld.
   
   I will take a look at a solution

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to