Tried to run build on multiple nodes with installed exec runners on each. When in pipeline ‘node’ section I specify only one single node, pipeline builds successfully. When specify another single node, pipeline also builds successfully. When I specify both of this nodes, build stuck in pending state.
So I think, this is not issue with connection between server and runners. Because each node alone works fine, they don’t work if are defined simultaneously. Maybe I just don’t understand exec runner principle and it could not be used in this way? (to run the same task on multiple hosts).
Also in documentation said: ‘The nodes section’ but in example below name of the key is ‘node:’ without ‘s’ at the end. With both variants result the same, pipeline stuck in pending state. But what syntax is correct to use?
My pipeline:
---
kind: pipeline
type: exec
name: deploy_nodes
clone:
disable: true
trigger:
branch:
- feature*
steps:
- name: run_puppet_agent
commands:
- bash -c 'sudo /opt/puppetlabs/bin/puppet agent --environment=${DRONE_BRANCH} -t || test $? -eq 2'
node:
drone-exec: drone.west
gitea-exec: gitea.west
Runner configuration on drone.west host:
[Unit]
Description=Drone Continuous Delivery system Exec Runner
After=syslog.target network.target
[Service]
RestartSec=2s
Type=simple
User=drone
Group=drone
WorkingDirectory=/opt/drone
Restart=always
ExecStart=/opt/drone/drone-runner-exec
Environment=HOME=/opt/drone \
GODEBUG=netdns=go \
DRONE_RPC_SECRET=bea26a2221fd8090ea38720fc445eca6 \
DRONE_RPC_PROTO=http \
DRONE_RPC_HOST=drone.west \
DRONE_RUNNER_LABELS=drone-exec:drone.west
[Install]
WantedBy=multi-user.target
Runner configuration on gitea.west host:
[Unit]
Description=Drone Continuous Delivery system Exec Runner
After=syslog.target network.target
[Service]
RestartSec=2s
Type=simple
User=drone
Group=drone
WorkingDirectory=/opt/drone
Restart=always
ExecStart=/opt/drone/drone-runner-exec
Environment=HOME=/opt/drone \
GODEBUG=netdns=go \
DRONE_RPC_SECRET=bea26a2221fd8090ea38720fc445eca6 \
DRONE_RPC_PROTO=http \
DRONE_RPC_HOST=drone.west \
DRONE_RUNNER_LABELS=gitea-exec:gitea.west
[Install]
WantedBy=multi-user.target