community-catalog icon indicating copy to clipboard operation
community-catalog copied to clipboard

[janitor] cannot deploy v1.6 on Rancher 1.0.1

Open leoschweizer opened this issue 8 years ago • 6 comments

When I try to launch a janitor Stack v1.6 on Rancher 1.0.1, this results in an endless loop of deployment attempts with the following error output from the Rancher Server:

time="2016-05-19T15:35:20Z" level=error msg="Stack Create Event Failed: yaml: unmarshal errors:\n  line 13: cannot unmarshal !!str `true` into bool" eventId=074ccb45-6586-4548-bd82-8bb0c4c2cdc8 resourceId=1e3
time="2016-05-19T15:35:20Z" level=error msg="Failed to unmarshall: yaml: unmarshal errors:\n  line 13: cannot unmarshal !!str `false` into bool\nenvironment:\n  CLEAN_PERIOD: 3600\n  DEBUG: 0\n  DELAY_TIME: 900\n  KEEP_CONTAINERS: '*:*'\n  KEEP_IMAGES: rancher/\n  LOOP: \"true\"\nimage: meltwater/docker-cleanup:1.6.0\nlabels:\n  io.rancher.scheduler.affinity:host_label_ne: janitor.exclude=true\n  io.rancher.scheduler.global: \"true\"\nnet: none\nprivileged: \"false\"\nstdin_open: false\ntty: false\nvolumes:\n- /var/run/docker.sock:/var/run/docker.sock\n- /var/lib/docker:/var/lib/docker\n"
time="2016-05-19T15:35:20Z" level=error msg="Failed to parse service cleanup: yaml: unmarshal errors:\n  line 13: cannot unmarshal !!str `false` into bool"
time="2016-05-19T15:35:20Z" level=error msg="Could not parse config for project janitor : yaml: unmarshal errors:\n  line 13: cannot unmarshal !!str `false` into bool"

The problem seems to be that privileged has a value of "true" or "false" instead of true or false, but that is just a guess from my side.

This is probably related to #142 but my Rancher instance did not prevent me from deploying.

On a related note: how do I get rid of these stuck services, they don't show up in the Rancher UI :(


Useful Info
Versions Rancher v1.0.1 Cattle: v0.159.7 UI: v1.0.5

leoschweizer avatar May 19 '16 15:05 leoschweizer

Rancher will not stop you from deploying in the UI. The YAML is not run through 'compose' until it is POSTed to the API.

If you look under Admin > processes there should be processes that are stuck. You can click on them into the API and use the buttons to disable/remove/delete.

cloudnautique avatar May 19 '16 17:05 cloudnautique

@cloudnautique thanks for your explanation. I'm just wondering why the linked issue describes a totally different error, because I suspect that the cause of the problem is the same.

@sshipway just pinging you so you notice this issue, I'm not even sure if this is the right place to report it. Please point me elsewhere should there be a more suitable place somewhere 😉

leoschweizer avatar May 19 '16 20:05 leoschweizer

@sshipway, are you seeing the error on #142 with the devX rancher versions or the 1.0.1? I believe between rancher-compose 0.7.x in 1.0.1 and 0.8.x in devX releases we changed yaml parsers.

cloudnautique avatar May 20 '16 02:05 cloudnautique

@cloudnautique I'm using Rancher v1.1.0-dev1 where I get the errors.

sshipway avatar May 20 '16 04:05 sshipway

May be related to https://github.com/rancher/rancher/issues/4822 I think

sshipway avatar May 24 '16 02:05 sshipway

Updated template pull req in to remove the privileged option (defaulting to true again for maximum compatibility)

sshipway avatar Jun 02 '16 00:06 sshipway