Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploying redis docker image to bosh-lite, state remains in CLAIMED forever #80

Closed
shalako opened this issue Oct 6, 2015 · 6 comments
Closed

Comments

@shalako
Copy link

shalako commented Oct 6, 2015

following instructions for veritas, trying to deploy redis to diego on bosh-lite.

https://github.com/pivotal-cf-experimental/veritas

root@dd83d975-2942-4170-8322-e7f768d3ac5d:~# cat redis.lrp
{
    "process_guid":"82bcf571-630f-4ad3-bfa6-146afd40bded",
    "domain": "redis",
    "rootfs":"docker:///redis",
    "instances":1,
    "ports":[
        6379
    ],
    "action":{
        "run":{
            "path":"/entrypoint.sh",
            "args":[
                "redis-server"
            ],
            "dir":"/data",
            "user":"root"
        }
    }
}

root@dd83d975-2942-4170-8322-e7f768d3ac5d:~# BBS_ENDPOINT=http://bbs.service.cf.internal:8889 veritas desire-lrp redis.lrp
Desiring:
{
  "process_guid": "82bcf571-630f-4ad3-bfa6-146afd40bded",
  "domain": "redis",
  "rootfs": "docker:///redis",
  "instances": 1,
  "env": null,
  "action": {
    "run": {
      "path": "/entrypoint.sh",
      "args": [
        "redis-server"
      ],
      "dir": "/data",
      "user": "root"
    }
  },
  "start_timeout": 0,
  "disk_mb": 0,
  "memory_mb": 0,
  "cpu_weight": 0,
  "privileged": false,
  "ports": [
    6379
  ],
  "log_source": "",
  "log_guid": "",
  "metrics_guid": "",
  "annotation": ""
}

root@dd83d975-2942-4170-8322-e7f768d3ac5d:~# BBS_ENDPOINT=http://bbs.service.cf.internal:8889 veritas dump-store
Tasks
LRPs
  522884f4-c3b0-413a-b588-3c0e56b5702f-11d7bf6c-1dc9-49be-b932-390825871a47
    1 preloaded:cflinuxfs2 PRIVILEGED (256 MB, 1024 MB, 1 CPU)
      8080 => hello-routing.10.244.0.34.xip.io
       0: 57083a59-a64b-46ef-63e7-8ef3feb40c74 cell_z1-0 [RUNNING for 27m51.050250015s]
  82bcf571-630f-4ad3-bfa6-146afd40bded
    1 docker:///redis (0 MB, 0 MB, 0 CPU)
       0: 161d9c5d-34d4-461a-5d93-904a6412b100 cell_z1-0 [CLAIMED for 3.823272526s]
  92bcf571-630f-4ad3-bfa6-146afd40bded
    UNDESIRED
       0: [CRASHED (3 - Container stopped by user) for 5m18.878019295s]
Domains
  cf-apps

lrp state never changes from CLAIMED to RUNNING

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/105056906.

@Amit-PivotalLabs
Copy link

It looks like it was claimed for 3.8s, not that long. It might be cycling
through pending, claimed, crashed, pending.... If you "watch veritas
dump-store" do you see the docker:///redis app cycle around the state
machine?

On Tue, Oct 6, 2015 at 4:08 PM, cf-gitbot notifications@github.com wrote:

We have created an issue in Pivotal Tracker to manage this. You can view
the current status of your issue at:
https://www.pivotaltracker.com/story/show/105056906.


Reply to this email directly or view it on GitHub
#80 (comment)
.

@shalako
Copy link
Author

shalako commented Oct 6, 2015

tried setting properties.diego.executor.allow_privileged: true as was recommended in the past, as redis must run as root. this did not appear to fix the problem.

looks like the executor disappeared, anyway

@emalm
Copy link
Member

emalm commented Oct 7, 2015

Hi, @shalako,

What versions of CF and Diego are you running on your BOSH-lite? I'll try to reproduce this on my local instance, once I get it bootstrapped. It may be that the image is taking an unusual time to download, or that garden-linux for some reason can't download it from inside the BOSH-lite VM.

The diego.executor.allow_privileged property is no longer present in the release, as the executor now always allows privileged (run-as-root) actions. The executor is still present, but as a logical process running inside the rep instead of as a separate OS process.

Thanks,
Eric

@emalm
Copy link
Member

emalm commented Oct 7, 2015

Hey, @shalako,

I was able to get the redis image running on my BOSH-lite with that same LRP JSON, using BOSH-lite 9000.55.0 and recent builds of cf-release and diego-release, so I suspect the issue might be with garden-linux 0.307.0 and how it's interacting with the system on your 9000.36.0 BOSH-lite image.

I think at one point we made sure to set the garden.mount_btrfs_loopback property set to true in your Diego deployment manifest, to work around these kinds of issues. Is it still set that way?

Also, since we were seeing errors from garden-linux about the /sys filesystem, let's also check whether sysfs is correctly mounted on that directory.

Thanks,
Eric

@shalako
Copy link
Author

shalako commented Oct 7, 2015

@ematpl

Thanks so much for trying it out. I destroyed and upgraded the box. Now on 9000.56.0 and everything working so far. Redis came right up. Didn't have to change garden.mount_btrfs_loopback, though now that you mention I remember we had to alter that to get things working before.

In the past I was doing a git pull in the bosh-lite dir, but this time on bringing the box up I noticed a warning suggesting vagrant box upgrade. That appears to have done the trick. Looks like I may not have had to destroy the box either; I'll try an in-place upgrade next time.

@shalako shalako closed this as completed Oct 7, 2015
jfmyers9 pushed a commit that referenced this issue Mar 2, 2016
Submodule src/github.com/pkg/sftp cbc2879..e84cc8c:
  > Merge pull request #85 from pkg/rootdir
  > Merge pull request #81 from pkg/server-option
  > Merge pull request #80 from pkg/functional-options
  > Merge pull request #78 from pkg/server-readonly
  > Merge pull request #79 from pkg/readme-badges
  > Merge pull request #77 from pkg/namedreturns
  > Merge pull request #75 from pkg/golint
  > Merge pull request #73 from mdlayher/golint
  > Merge pull request #74 from LiterallyElvis/master
  > Merge pull request #72 from mdlayher/master
  > Merge pull request #70 from pkg/fixedbugs/69
  > Merge pull request #67 from mdlayher/master
  > Merge pull request #64 from pkg/fixedbugs/28
  > Merge pull request #63 from pkg/fixedbugs/5
  > Merge pull request #61 from pkg/add-travis
  > Merge pull request #62 from xiu/bugfix/35-cant-remove-directories-on-servu
  > Merge pull request #58 from sykesm/client-realpath
  > Merge pull request #60 from pkg/fixedbugs/57
  > updated contribution guidelines

Signed-off-by: James Myers <jmyers@pivotal.io>
robertjsullivan added a commit that referenced this issue Mar 12, 2020
Submodule src/github.com/square/certstrap b61237589..bd8b02aa8:
  > Bump Go to 1.13
  > Merge pull request #85 from square/mbyczkowski/better-versioning
  > Merge pull request #81 from square/mbyczkowski/option-for-output
  > Merge pull request #80 from square/dependabot/go_modules/github.com/urfave/cli-1.21.0
  > Merge pull request #79 from square/mbyczkowski/godoc-badge
  > Merge pull request #71 from julianedwards/extractname
  > Merge pull request #77 from julianedwards/newtemplates
  > Merge pull request #73 from defer/ft-text-fixes
  > Merge pull request #69 from square/cs/dockerfile
  > Merge pull request #68 from square/cs/update-cli
  > Merge pull request #67 from square/cs/mod

Co-authored-by: Edwin Xie <exie@pivotal.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants