Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Unit]
- Description=pipeline remove tickets worker instances as a service, instance %i
- Requires=pipeline-remove.service
- Before=pipeline-remove.service
- BindsTo=pipeline-remove.service
- [Service]
- PermissionsStartOnly=true
- Type=idle
- User=root
- ExecStart=/path/to/venv/bin/python /pipeline/python/daemons/remove_tickets.py
- Restart=always
- TimeoutStartSec=10
- RestartSec=10
- [Install]
- WantedBy=pipeline-remove.service
- [Unit]
- Description=manages pipeline remove tickets worker instances as a service, instance
- [Service]
- Type=oneshot
- ExecStart=/usr/bin/sh /usr/bin/pipeline-remove-start.sh
- RemainAfterExit=yes
- [Install]
- WantedBy=multi-user.target
- #!/bin/bash
- systemctl start pipeline-remove@{1..2}
- PIPELINE_VIRTUALENV=/path/to/venv
- [Unit]
- Description=pipeline remove tickets worker instances as a service, instance %i
- Requires=pipeline-remove.service
- Before=pipeline-remove.service
- BindsTo=pipeline-remove.service
- [Service]
- PermissionsStartOnly=true
- Type=idle
- User=root
- EnvironmentFile=/etc/profile.d/pipeline_envvars.sh
- ExecStart=/${PIPELINE_VIRTUALENV}/bin/python /pipeline/python/daemons/remove_tickets.py
- Restart=always
- TimeoutStartSec=10
- RestartSec=10
- [Install]
- WantedBy=pipeline-remove.service
- sudo systemctl daemon-reload
- sudo systemctl restart pipeline-remove@{1..1}
- sudo systemctl status pipeline-remove@{1..1}
- ● pipeline-remove@1.service - pipeline remove tickets worker instances as a service, instance 1
- Loaded: loaded (/etc/systemd/system/pipeline-remove@.service; disabled; vendor preset: disabled)
- Active: activating (auto-restart) (Result: exit-code) since Fri 2018-01-26 15:04:50 UTC; 6s ago
- Process: 11716 ExecStart=/${PIPELINE_VIRTUALENV}/bin/python /pipeline/python/daemons/remove_tickets.py (code=exited, status=203/EXEC)
- Main PID: 11716 (code=exited, status=203/EXEC)
- Jan 26 15:04:50 dev systemd[1]: pipeline-remove@1.service: main process exited, code=exited, status=203/EXEC
- Jan 26 15:04:50 dev systemd[1]: Unit pipeline-remove@1.service entered failed state.
- Jan 26 15:04:50 dev systemd[1]: pipeline-remove@1.service failed.
- Jan 26 15:07:13 dev systemd: Starting pipeline remove tickets worker instances as a service, instance 1...
- Jan 26 15:07:13 dev systemd: Failed at step EXEC spawning /${PIPELINE_VIRTUALENV}/bin/python: No such file or directory
- Jan 26 15:07:13 dev systemd: pipeline-remove@1.service: main process exited, code=exited, status=203/EXEC
- Jan 26 15:07:13 dev systemd: Unit pipeline-remove@1.service entered failed state.
- Jan 26 15:07:13 dev systemd: pipeline-remove@1.service failed.
- Jan 26 15:07:23 dev systemd: pipeline-remove@1.service holdoff time over, scheduling restart.
- Jan 26 15:07:23 dev systemd: Started pipeline remove tickets worker instances as a service, instance 1.
- Failed to start pipeline-remove@1.service: Unit is not loaded properly:
- Invalid argument.
- See system logs and 'systemctl status pipeline-remove@1.service' for
- details.
- vagrant@dev:~$ sudo systemctl status pipeline-remove@{1..1}
- ● pipeline-remove@1.service - pipeline remove tickets worker instances as a service, instance 1
- Loaded: error (Reason: Invalid argument)
- Active: inactive (dead)
- Jan 26 15:11:39 dev systemd[1]: pipeline-remove@1.service failed.
- Jan 26 15:11:42 dev systemd[1]: Stopped pipeline remove tickets worker instances as a service, instance 1.
- Jan 26 15:11:42 dev systemd[1]: [/etc/systemd/system/pipeline-remove@.service:12] Executable path is not absolute, ignoring: ${PIPELINE_VIRTUALENV}/bin/python /pipel...e_tickets.py
- Jan 26 15:11:42 dev systemd[1]: pipeline-remove@1.service lacks both ExecStart= and ExecStop= setting. Refusing.
Add Comment
Please, Sign In to add comment