Skip to content

Conversation

@davidvossel
Copy link
Contributor

Example:

'docker run --name="cluster-container" myimage sleep 10000'

would be executed and managed by the docker HA agent with these options
OCF_RESKEY_run_cmd="sleep 10000"
OCF_RESKEY_image="myimage"
OCF_RESKEY_container="cluster-container"

If the image did not exist locally and you want the image to be dynamically pulled from the docker registry on startup, the 'allow_pull' option lets this happen.

Also, custom 'docker run' args can be set using the 'run_opts' option.

-- Vossel

@davidvossel
Copy link
Contributor Author

update monitor logic

@kikupotter
Copy link

hi ,i used this RA in my pacemaker +corosync cluster.
i created resource :
crm configure primitive sshd params image="centos:sshd" container=sshd run_cmd="/usr/sbin/sshd -D" run_opts="-it -p 20022:22"
and
[root@node02 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos sshd 3f7db58a4f75 9 hours ago 278.5 MB
centos centos6 d3d49dd114bd 6 days ago 212.7 MB

when i started resource sshd,then failed;
log:
Failed actions:
sshd_start_0 on node01 'not configured' (6): call=104, status=complete, last-rc-change='Fri Oct 3 02:14:05 2014', queued=34ms, exec=0ms
thx.

@davidvossel
Copy link
Contributor Author

@kikupotter Ah yes. I bet there is a bug in how I detect the image when you set the image:tag. I can fix this!

It's great you're testing this agent. I'll fix the agent up, we'll both do some testing and then lets get this agent merged finally :)

@davidvossel
Copy link
Contributor Author

@kikupotter Alright, the agent is updated. It should work for you now. Please checkout the new changes.

David Vossel added 3 commits October 6, 2014 12:31
By default containers started with the docker OCF agent are dynamically
created on start and removed after stop. By using the 'reuse' option,
containers will never be destroyed after stop, allowing the same container
to be reused.
originally the default container name was the resource instance
name prefixed with 'HA-'. This is confusing and unncessary. Now
the container name defaults directly to the resource instance name
with no prefix.
@davidvossel
Copy link
Contributor Author

this agent should be ready at this point

@davidvossel
Copy link
Contributor Author

It is important that we make this agent available as soon as possible. Without any further feedback, I'm planning on merging this agent the beginning of next week. Oct 13th

davidvossel pushed a commit that referenced this pull request Oct 13, 2014
High: Introduces the docker agent to manage docker containers in an HA environment
@davidvossel davidvossel merged commit ee7ff8d into ClusterLabs:master Oct 13, 2014
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

Successfully merging this pull request may close these issues.

2 participants