weixin_39788131 2020-11-29 21:13 采纳率: 0%
浏览 0

Code changes for 1634390 - systemd Install/Upgrade modification

Description of change

The PR addresses the code changes to install the service files in systemd path during fresh installation and also during upgrade step to 2.4.0

QA steps

Bootstrap lxd container and deploy applications and verify if the controller and other unit has service in '/lib/systemd/' path. Upgrade to 2.4 from any old version of juju and verify the service file installed path.

Documentation changes

N/A

Bug reference

https://mail.google.com/mail/u/0/#inbox/162cbf9b65f380b6

该提问来源于开源项目:juju/juju

  • 写回答

5条回答 默认 最新

  • weixin_39788131 2020-11-29 21:13
    关注

    Hi BabbageClunk, As explained earlier, the issue with upgrade related to systemd service(upgrade was hanging) due to MongoDB server gets configured and started as part of upgradesteps even before the installServiceFile() in steps_24 gets executed is fixed now. The issue existed because in the MongoDB configuration it tries to read and start juju-db service file by creating a newService. But the newService will eventually refer to /lib/systemd/system which is required code change. the service files should exists in this path during fresh installation. So i have done a fix around this code path EnsureServer() in mongo.go to write new service files in /lib/systemd/system location after stopping the service if its already running. The cleanup from /var/lib/juju/init folder is done in my installServiceFile() function. So its successfully up and running now.

    Please for verification and review: install 237 and run upgrade-juju command with 2.4beta2 client. and run ls -l /etc/systemd/system

    also please verify if the /var/lib/juju/init is deleted and /lib/systemd/system has the service files.

    I have verified with controller.

    However, 2 things: * we need to justify this fix for MongoDB configuration setting. * As i already mentoined, we need to verify this with /var partition unmounted.

    I can show u a demo tomorrow.

    Will cleanup the critical logs and commented code in mongo.go and machine.go files. And, I should add code for "systemctl reload-daemon"

    Please review this changes and we can discuss in the morning.

    评论

报告相同问题?