Incident Report - dockerd-configuration-options/start-dockerd-with-systemd.sh - line 166: /bin/systemctl No such file or directory
Closed this issue · 2 comments
Describe the incident:
dockerd-configuration-options
received error
/etc/docker/start-dockerd-with-systemd.sh: line 166: /bin/systemctl: No such file or directory
To reproduce the incident:
Steps to reproduce the behavior:
mkdir temp
cd temp
git clone https://github.com/BradleyA/docker-security-infrastructure
cd docker-security-infrastructure/dockerd-configuration-options
sudo ./setup-dockerd.sh
cd ../../..
rm -rf ./temp
Actual results:
git clone https://github.com/BradleyA/docker-security-infrastructure
Cloning into 'docker-security-infrastructure'...
remote: Enumerating objects: 161, done.
remote: Counting objects: 100% (161/161), done.
remote: Compressing objects: 100% (155/155), done.
remote: Total 6184 (delta 99), reused 12 (delta 5), pack-reused 6023
Receiving objects: 100% (6184/6184), 2.53 MiB | 4.15 MiB/s, done.
Resolving deltas: 100% (3949/3949), done.
Checking connectivity... done.
101923 root@three:/etc/docker/certs.d/temp
# cd docker-security-infrastructure/dockerd-configuration-options
101923 root@three:/etc/docker/certs.d/temp/docker-security-infrastructure/dockerd-configuration-options
# sudo ./setup-dockerd.sh
2020-04-10T19:23:17.692727-05:00 (CDT) three.cptx86.com ./setup-dockerd.sh[13281] 3.266.733 143 root 0:0 [INFO] Started...
Changes made to /etc/docker/dockerd-configuration-file will be
added to Upstart and Systemd configuration files for dockerd.
Move files to /etc/docker/
Update files for dockerd (Upstart and SysVinit configuration file)
for Ubuntu 14.04.
. . . dockerd for Ubuntu 14.04 has been updated.
If you are using upstart,
Run 'sudo service docker restart'
for dockerd to read /etc/default/docker.
Update files for dockerd (systemd configuration file)
on Ubuntu 16.04.
2020-04-10T19:23:17.756863-05:00 (CDT) three.cptx86.com /etc/docker/start-dockerd-with-systemd.sh[13323] 3.236.686 39 root 0:0 [INFO] Started...
Creating /etc/docker/10-override.conf file.
10-override.conf move to /etc/systemd/system/docker.service.d.
/etc/docker/start-dockerd-with-systemd.sh: line 166: /bin/systemctl: No such file or directory
2020-04-10T19:23:17.839512-05:00 (CDT) three.cptx86.com /etc/docker/start-dockerd-with-systemd.sh[13323] 3.236.686 168 root 0:0 [INFO] Operation finished.
./setup-dockerd.sh: line 225: systemctl: command not found
If you are using systemd, Run
'sudo systemctl enable dockerd-configuration-file.service'
to start on boot.
Run 'sudo systemctl enable docker'
to start on boot.
Run 'sudo systemctl restart docker'
2020-04-10T19:23:17.844984-05:00 (CDT) three.cptx86.com ./setup-dockerd.sh[13281] 3.266.733 231 root 0:0 [INFO] Operation finished.
101923 root@three:/etc/docker/certs.d/temp/docker-security-infrastructure/dockerd-configuration-options
# cd ../../..
101923 root@three:/etc/docker/certs.d
# rm -rf ./temp
101927 root@three:/etc/docker/certs.d
Expected results:
A clear and concise description of what you expected to happen.
Version:
- OS: Ubuntu 14.04
- Command: /etc/docker/start-dockerd-with-systemd.sh[13323] 3.236.686
Screenshots:
NA
Ubuntu 14.04 does not include systemctl in /bin
The problem was on systems running Ubuntu 14.04 the setup-dockerd.sh script was running the setup for 16.04. added code to skip section of code requiring systemctl when running on Ubuntu 14.04