Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commands fail poorly if container is not running #3

Open
emcniece opened this issue Mar 11, 2017 · 0 comments
Open

Commands fail poorly if container is not running #3

emcniece opened this issue Mar 11, 2017 · 0 comments

Comments

@emcniece
Copy link
Member

For example, executing service nginx reload on an Nginx container that is down renders the following error:

INFO[0091] Executing notify command 'rgon-exec -name=rgon-proxy-nginx-1 -cmd="service nginx reload"'
INFO[0091] [rgon-exec -name=rgon-proxy-nginx-1 -cmd="service nginx reload"]: "Executing [service nginx reload] on container [rgon-proxy-nginx-1]"
INFO[0091] [rgon-exec -name=rgon-proxy-nginx-1 -cmd="service nginx reload"]: "Value is not a string: [{\"id\":\"1i25097\",\"type\":\"container\",\"links\":{\"self\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\",\"account\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/account\",\"credentials\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/credentials\",\"healthcheckInstanceHostMaps\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/healthcheckinstancehostmaps\",\"hosts\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/hosts\",\"instanceLabels\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/instancelabels\",\"instanceLinks\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/instancelinks\",\"instances\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/instances\",\"mounts\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/mounts\",\"ports\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/ports\",\"serviceEvents\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/serviceevents\",\"serviceExposeMaps\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/serviceexposemaps\",\"services\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/services\",\"targetInstanceLinks\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/targetinstancelinks\",\"volumes\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/volumes\",\"stats\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/stats\",\"containerStats\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/containerstats\"},\"actions\":{\"update\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/?action=update\",\"error\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/?action=error\",\"remove\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/?action=remove\",\"start\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/?action=start\",\"logs\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/?action=logs\",\"setlabels\":\"http:\\/\\/rancher.limbicmedia.ca:8080\\/v1\\/containers\\/1i25097\\/?action=setlabels\"},\"baseType\":\"instance\",\"name\":\"rgon-proxy-nginx-1\",\"state\":\"stopped\",\"accountId\":\"1a5\",\"blkioDeviceOptions\":null,\"build\":null,\"capAdd\":null,\"capDrop\":null,\"command\":null,\"cpuSet\":null,\"cpuShares\":null,\"createIndex\":1,\"created\":\"2017-03-11T00:49:09Z\",\"createdTS\":1489193349000,\"dataVolumeMounts\":{},\"dataVolumes\":[\"\\/limbic-ci\\/rancher\\/rgon-proxy\\/htpasswd:\\/etc\\/nginx\\/htpasswd\",\"\\/limbic-ci\\/rancher\\/rgon-proxy\\/conf:\\/etc\\/nginx\\/conf.d\",\"\\/limbic-ci\\/rancher\\/rgon-proxy\\/vhost:\\/etc\\/nginx\\/vhost.d\",\"\\/limbic-ci\\/rancher\\/rgon-proxy\\/certs:\\/etc\\/nginx\\/certs\"],\"dataVolumesFrom\":null,\"deploymentUnitUuid\":\"fdae4660-74c4-40e5-a0a6-5737f4d67840\",\"description\":null,\"devices\":null,\"dns\":[\"169.254.169.250\"],\"dnsSearch\":[\"rgon-proxy.rancher.internal\",\"nginx.rgon-proxy.rancher.internal\",\"rancher.internal\"],\"domainName\":null,\"entryPoint\":null,\"environment\":null,\"expose\":null,\"externalId\":\"cb27fac0866bbb7c6c69c5a36fc4d7082e2ea3635e54f8542e7c351bb1a9956b\",\"extraHosts\":null,\"firstRunning\":\"2017-03-11T00:49:26Z\",\"firstRunningTS\":1489193366000,\"healthCheck\":null,\"healthState\":null,\"hostId\":\"1h1\",\"hostname\":null,\"imageUuid\":\"docker:nginx\",\"kind\":\"container\",\"labels\":{\"io.rancher.service.deployment.unit\":\"fdae4660-74c4-40e5-a0a6-5737f4d67840\",\"io.rancher.sidekicks\":\"rgon-proxy\",\"rgon-proxy\":\"nginx\",\"io.rancher.stack_service.name\":\"rgon-proxy\\/nginx\",\"io.rancher.service.launch.config\":\"io.rancher.service.primary.launch.config\",\"io.rancher.project.name\":\"rgon-proxy\",\"io.rancher.project_service.name\":\"rgon-proxy\\/nginx\",\"io.rancher.stack.name\":\"rgon-proxy\",\"io.rancher.service.hash\":\"7884dd9853e11921f69b2b9d8525dc343b253c80\",\"io.rancher.scheduler.global\":\"false\",\"io.rancher.container.ip\":\"10.42.233.140\\/16\",\"io.rancher.container.uuid\":\"3efb884a-3050-4aa7-8566-8ab6b225370d\",\"io.rancher.cni.network\":\"ipsec\",\"io.rancher.cni.wait\":\"true\",\"io.rancher.container.name\":\"rgon-proxy-nginx-1\"},\"logConfig\":{\"type\":\"logConfig\",\"config\":{\"max-file\":\"5\",\"max-size\":\"10m\"},\"driver\":\"json-file\"},\"lxcConf\":null,\"memory\":null,\"memorySwap\":null,\"nativeContainer\":false,\"networkContainerId\":null,\"networkMode\":\"managed\",\"pidMode\":null,\"ports\":[\"80:80\\/tcp\",\"443:443\\/tcp\"],\"primaryIpAddress\":\"10.42.233.140\",\"privileged\":false,\"publishAllPorts\":false,\"readOnly\":false,\"registryCredentialId\":null,\"removed\":null,\"requestedHostId\":null,\"restartPolicy\":null,\"securityOpt\":null,\"startCount\":4,\"startOnCreate\":true,\"stdinOpen\":true,\"systemContainer\":null,\"transitioning\":\"no\",\"transitioningMessage\":null,\"transitioningProgress\":null,\"tty\":true,\"user\":null,\"uuid\":\"3efb884a-3050-4aa7-8566-8ab6b225370d\",\"version\":\"0\",\"volumeDriver\":null,\"workingDir\":null,\"primaryNetworkId\":\"1n5\"}]"
INFO[0091] [rgon-exec -name=rgon-proxy-nginx-1 -cmd="service nginx reload"]: "2017/03/11 00:51:07 [EXEC] Fatal: Couldn't parse container JSON"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant