Skip to content

Add restart option to Fig. - #594

Merged
bfirsh merged 1 commit into
docker:masterfrom
paulRbr:restart-option
Dec 8, 2014
Merged

bfirsh merged 1 commit into
docker:masterfrom
paulRbr:restart-option

Conversation

@paulRbr

@paulRbr paulRbr commented Oct 28, 2014

Copy link
Copy Markdown

Hello!

I simply find this project really good, and ended up needing the restart option (Related to #478).

Since Docker 1.2 there is a restart option on docker running containers to add restart policies. I think fig options should be able to set restart policies to it's orchestrated containers.
This PR adds the option in Fig.

Let me know if there it's all ok?

@bfirsh

bfirsh commented Oct 28, 2014

Copy link
Copy Markdown

Hello! Thanks for this.

It looks like the option to start() is restart_policy not restart. I think I prefer restart in fig.yml though - it matches the docker run option.

@paulRbr
paulRbr force-pushed the restart-option branch 10 times, most recently from 9d0ea1c to 7b91175 Compare October 28, 2014 22:12
@paulRbr

paulRbr commented Oct 28, 2014

Copy link
Copy Markdown
Author

Hi @bfirsh!

Indeed it's restart_policy I hadn't check with the docker-py api.
Got the modification done and left the option name to match the docker run one, hope to see this in the next release so we can use it in our project.

Cheers!

@thaJeztah

Copy link
Copy Markdown
Member

👍 @bfirsh any chance this could make it in the 1.0.1 release? Will that be at the same time as the Docker 1.3.1?

@bfirsh

bfirsh commented Oct 29, 2014

Copy link
Copy Markdown

I think we'll release 1.0.1 as a quick bugfix release as soon as dockerpty is ready. We can then put this into a larger 1.1 feature release.

@thaJeztah

Copy link
Copy Markdown
Member

Guess I'll have to be patient then, or look into compiling fig myself :)

@paulRbr

paulRbr commented Oct 29, 2014

Copy link
Copy Markdown
Author

I have to admit that I would have loved to see this in 1.0.1 too.

If we consider that Fig should be in sync with the docker releases, then this is a bug fix and not a new feature 😄

@bfirsh

bfirsh commented Oct 29, 2014

Copy link
Copy Markdown

Fig isn't in sync with Docker.

@bfirsh

bfirsh commented Oct 29, 2014

Copy link
Copy Markdown

It might make it into 1.0.1, but it's not going to be a blocker for a bugfix release, that's all.

I would quite like to make 1.0.x bug fix releases and 1.x.0 feature releases, as per semantic versioning (and how Docker does it).

@paulRbr

paulRbr commented Oct 29, 2014

Copy link
Copy Markdown
Author

Yes I thought so and agree clearly with your point.

Obviously this is a new feature for Fig. Thus should be in a 1.x.0 release.

Thanks for your work !
Em 29/10/2014 16:01, "Ben Firshman" [email protected] escreveu:

Fig isn't in sync with Docker.

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

@bfirsh

bfirsh commented Oct 29, 2014

Copy link
Copy Markdown

Though that's not to disregard your PR. I really want this too. ;)

Currently figuring out how to get our CI system to run the damn test suite. The tests run fine locally, so I think this is okay.

Comment thread fig/service.py

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stray comma here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I don't want the List but the only element inside

>>> a, = ['hello']
>>> a
'hello'
>>> a = ['hello']
>>> a
['hello']

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, neat.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name = parts[0] is much clearer. ;) Not a big deal.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough :)

@paulRbr

paulRbr commented Oct 29, 2014

Copy link
Copy Markdown
Author

I pushed force the first commit and pushed normally the second one, hope this forces the tests to run

@bfirsh

bfirsh commented Oct 30, 2014

Copy link
Copy Markdown

@paulRbr

paulRbr commented Oct 30, 2014

Copy link
Copy Markdown
Author

It seems the build was launch on the main changes (cc003a4) but not on my second commit of documentation (f457057).

@bfirsh

bfirsh commented Oct 30, 2014

Copy link
Copy Markdown

Oh yeah. Weird.

@paulRbr

paulRbr commented Nov 7, 2014

Copy link
Copy Markdown
Author

@bfirsh any chance to get this merged in?

@dnephin

dnephin commented Nov 7, 2014

Copy link
Copy Markdown

LGTM

@dnephin

dnephin commented Nov 7, 2014

Copy link
Copy Markdown

I'm not seeing a way to force the build, but @popox if you git commit --amend and make a whitespace change to the comment it should trigger another build I think.

@paulRbr
paulRbr force-pushed the restart-option branch 2 times, most recently from 35793f1 to b9bd478 Compare November 8, 2014 09:56
@paulRbr

paulRbr commented Nov 8, 2014

Copy link
Copy Markdown
Author

@dnephin commit amending didn't do the trick, so I just squashed and rebased on master.

@paulRbr

paulRbr commented Nov 8, 2014

Copy link
Copy Markdown
Author

The build is launched on my fork but not on the PR.

@dnephin

dnephin commented Nov 8, 2014

Copy link
Copy Markdown

Cool, works for me, looks good

Comment thread docs/yml.md

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still true? Thinking of :max_retry here (or is that to be considered a "single" value? idk)

@thaJeztah

Copy link
Copy Markdown
Member

@dnephin is there anything needed to move this PR forward? I added two small suggestions, but apart from that, wondering if this is ready to merge?

@docteurklein

Copy link
Copy Markdown

would be great to see this merged :)

@ghost ghost mentioned this pull request Nov 26, 2014
@dnephin

dnephin commented Dec 2, 2014

Copy link
Copy Markdown

LGTM

ping @bfirsh

@dnephin dnephin added this to the 1.1.0 milestone Dec 3, 2014
@bfirsh

bfirsh commented Dec 8, 2014

Copy link
Copy Markdown

LGTM

bfirsh added a commit that referenced this pull request Dec 8, 2014
@bfirsh
bfirsh merged commit e9d946b into docker:master Dec 8, 2014
@bfirsh

bfirsh commented Dec 8, 2014

Copy link
Copy Markdown

Thanks @popox!

@paulRbr
paulRbr deleted the restart-option branch December 8, 2014 17:44
@bfirsh bfirsh mentioned this pull request Dec 9, 2014
@cgcgbcbc

Copy link
Copy Markdown

I wonder when this feature will be published? along with 1.1.0 milestone? I noticed that there is no due date for 1.1.0 milestone.. so is there a current walk-around besides using the HEAD version?

@bsideup

bsideup commented Dec 22, 2014

Copy link
Copy Markdown

+1

Neat feature and it would be good to see it in release version ASAP

@blackrosezy

Copy link
Copy Markdown

+1

yuval-k pushed a commit to yuval-k/compose that referenced this pull request Apr 10, 2015
Add restart option to Fig.
Signed-off-by: Yuval Kohavi <[email protected]>
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.

8 participants