Comments (10)
Hi @acehege, can you post your compose files ?
from swarm-cronjob.
Hi @acehege, can you post your compose files ?
Sure...
non-crontab service
version: '3.6'
services:
runner:
build:
context: .
image: $DOCKER_REGISTRY_REPO:$DOCKER_TAG
environment:
- RUNNER_TAG_LIST
- RUNNER_EXECUTOR=${RUNNER_EXECUTOR-shell}
- REGISTER_RUN_UNTAGGED=${REGISTER_RUN_UNTAGGED-false}
- DOCKER_IMAGE
command: run
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/gitlab_runner_builds:/opt/gitlab_runner_builds
deploy:
replicas: 1
update_config:
order: start-first
placement:
constraints:
- node.role == manager
No extra labels are added to the service other then the default ones:
"com.docker.stack.image": "XXX/infrastructure/gitlab-runner-with-docker:fa9c1fd",
"com.docker.stack.namespace": "shared_runner",
"com.docker.ucp.access.label": "/",
"com.docker.ucp.collection": "swarm",
"com.docker.ucp.collection.root": "true",
"com.docker.ucp.collection.swarm": "true"
crontab enabled service
version: '3.7'
x-cron-labels:
&default-cron-labels
swarm.cronjob.enable: "true"
swarm.cronjob.schedule: "${SERVICE_CRONTAB_SCHEDULE:?err}"
swarm.cronjob.skip-running: "false"
services:
app:
healthcheck:
test: ["NONE"]
labels:
<< : *default-cron-labels
deploy:
labels:
<< : *default-cron-labels
restart_policy:
condition: none
from swarm-cronjob.
Can you set LOG_LEVEL=debug
env var to swarm-cronjob service and give me the logs ouput ?
from swarm-cronjob.
Can you set
LOG_LEVEL=debug
env var to swarm-cronjob service and give me the logs ouput ?
I am going to let it run overnight and post the logs tomorrow :)
from swarm-cronjob.
@acehege Ok thanks!
from swarm-cronjob.
It seems that updating a service ( or removing it ), tricks swarm-cronjob so it adds it to the cronlist... And ultimately crashes swarm-cronjob:
Mon, 14 Jan 2019 11:25:10 CET INF Add cronjob for service XXX with schedule
Mon, 14 Jan 2019 11:25:10 CET ERR Cannot update job for service XXX error="Empty spec string"
Mon, 14 Jan 2019 12:34:54 CET DBG Event triggered for XXX (newstate='completed' oldstate='updating')
panic: runtime error: index out of range
goroutine 1 [running]:
github.com/crazy-max/swarm-cronjob/app.Service(0xc0000e9d00, 0xc00016c010, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/app/app/swarm.go:60 +0x27d
github.com/crazy-max/swarm-cronjob/cmd.cronRun(0xb96600, 0xbb93b0, 0x0, 0x0)
/app/cmd/root.go:84 +0xaa3
github.com/spf13/cobra.(*Command).execute(0xb96600, 0xc00001c1b0, 0x0, 0x0, 0xb96600, 0xc00001c1b0)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:766 +0x2cc
github.com/spf13/cobra.(*Command).ExecuteC(0xb96600, 0xc0000aad80, 0xc0001b1f68, 0x7815fe)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x2fd
github.com/spf13/cobra.(*Command).Execute(0xb96600, 0x0, 0xc0000aae68)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:800 +0x2b
github.com/crazy-max/swarm-cronjob/cmd.Execute()
/app/cmd/root.go:24 +0x31
main.main()
/app/main.go:8 +0x20
from swarm-cronjob.
Okay, I was able to reproduce your issue. I keep you in touch for a fix.
from swarm-cronjob.
@acehege Can you test the latest release (0.1.2) ?
from swarm-cronjob.
@acehege Can you test the latest release (0.1.2) ?
Looks like the latest release fixed the issue 👍
from swarm-cronjob.
Thanks 🙂
Keep me in touch if you encounter any other problems
from swarm-cronjob.
Related Issues (20)
- it is possible to use code in the schedule? HOT 1
- documentation mistake in mariadb exemple HOT 1
- Why no Windows Docker image ?
- [QUESTION] Registry authentication HOT 2
- Terminal not showing the output of the python file
- Feature: Adding support for automatically fetching the newest image
- Email/slack notifications on warnings & errors HOT 2
- docker cap_add seems to work only with replica to 1 and not in scheduled mode HOT 2
- Panic when trying to extract registry auth from a service without registry auth HOT 1
- Report failed cron jobs in swarm-cronjob log HOT 1
- Couple of questions HOT 2
- Prometheus metrics endpoint
- Support for swarm jobs
- [Feature Request] Let external scripts ask swarm-cronjob to run a job
- No registration of new cron jobs in swarm-cronjob.
- Keep the command running until it finishes even if there was an update to the service. HOT 2
- Support running multiple, isolated instances of `swarm-cronjob` within a single Docker Swarm cluster
- Ability to trigger cron job via swarm-cronjob cli HOT 2
- Provide a UI + API to allow visualizing and executing schedules and one off jobs HOT 1
- After Updating docker container no longer starts. it starts and immadiatley fails. HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swarm-cronjob.