Skip to content

Add cli flag '--disable-hot-restart'.#2576

Merged
htuch merged 4 commits intoenvoyproxy:masterfrom
tonya11en:disable_hr_flag
Feb 15, 2018
Merged

Add cli flag '--disable-hot-restart'.#2576
htuch merged 4 commits intoenvoyproxy:masterfrom
tonya11en:disable_hr_flag

Conversation

@tonya11en
Copy link
Member

@tonya11en tonya11en commented Feb 9, 2018

hot restart: add cli flag to disable hot restart functionality

Description:

This PR attempts to fix #2029 by adding a command line flag to disable hot restart. This can still be accomplished via the currently existing compile flag.

Risk Level: Low | Medium | High

low

Testing:

Unit testing

Docs Changes:

N/A

Release Notes:

TODO

Fixes #2029

Signed-off-by: Tony Allen tallen@lyft.com

@mattklein123
Copy link
Member

Thanks for working on this! Some ultra quick notes:

  1. This is going to conflict with server: factor out MainCommon as a class, with a run method #2568. Please let that land first and potentially work with @jmarantz and @dnoe on this.
  2. Instead of checking that hot restart is disabled in the real hot restart implementation, the flag should instead using the NOP hot restarter like is currently done via ifdef in main.

@jmarantz
Copy link
Contributor

Thanks @mattklein123. Actually having --disable_hot_restart as a flag would be great. I hadn't added a flag before and I wasn't sure about all the steps required. Tony -- what do you think of splitting this PR so you just add the flag to Options/OptionsImpl here, but not make it operational. That wouldn't conflict with my PR and I could merge and use your flag in lieu of some explicit args I added.

Also, does this need a doc update associated with it?

@mattklein123
Copy link
Member

Also, does this need a doc update associated with it?

Yes needs docs here: https://www.envoyproxy.io/docs/envoy/latest/operations/cli with appropriate links into other parts of the docs.

(I did not do a full review, just quick skim w/ comments)

@htuch htuch self-assigned this Feb 11, 2018
@tonya11en
Copy link
Member Author

@jmarantz sounds good, I'll just add the flag. Thanks for taking a look!

@tonya11en
Copy link
Member Author

@mattklein123 is there anything I should do on my end to update the documentation? I grepped around the repo and didn't see files that contained the linked cli docs.

@mattklein123
Copy link
Member

Documentation is in the data-plane-api repo. See here: https://github.com/envoyproxy/data-plane-api/blob/master/CONTRIBUTING.md

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Small comment. Please fix DCO also.

Copy link
Member

Choose a reason for hiding this comment

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

I would use ReturnPointee here.

Signed-off-by: Tony Allen <tallen@lyft.com>
Tony Allen added 2 commits February 12, 2018 11:13
Signed-off-by: Tony Allen <tallen@lyft.com>
This reverts commit a2dcdf3.

Signed-off-by: Tony Allen <tallen@lyft.com>
@tonya11en
Copy link
Member Author

I'll figure out what's going on with that ReturnPointee call one night this week. Can't do much during the work day.

Signed-off-by: Tony Allen <tallen@lyft.com>
Copy link
Contributor

@jmarantz jmarantz left a comment

Choose a reason for hiding this comment

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

This looks great and would be easy to integrate into my PR.

htuch pushed a commit to envoyproxy/data-plane-api that referenced this pull request Feb 13, 2018
This is the update to the documentation that's required once the --disable-hot-restart cli flag PR is merged. See envoyproxy/envoy#2576.

Signed-off-by: Tony Allen <tallen@nutanix.com>
@htuch
Copy link
Member

htuch commented Feb 13, 2018

@tonya11en Now that #2568 is merged, do you want to merge master and make any needed changes?

@tonya11en
Copy link
Member Author

@jmarantz once this gets approved/merged, should I just go ahead and work it into your recently merged PR? Not sure if you had other plans regarding this.

@tonya11en
Copy link
Member Author

@htuch sounds good to me, I just need someone to approve this PR. I'm not authorized to merge this guy.

Copy link
Contributor

@dnoe dnoe left a comment

Choose a reason for hiding this comment

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

@htuch for final review

@htuch htuch merged commit 02c34e0 into envoyproxy:master Feb 15, 2018
lita pushed a commit to lita/envoy that referenced this pull request Feb 15, 2018
htuch pushed a commit that referenced this pull request Mar 2, 2018
The --disable-hot-restart flag was added to the binary in #2576 by @tonya11en but not hooked up (at my request). Now that the main_common refactor is in, it's easier to hook it up. This also offers the opportunity for some minor code simplifications.

Risk Level: Medium -- this affects the startup path.

Testing:
//test/...
added a new subtest to hotrestart_test.sh to cover --disable-hot-restart. I'd appreciate suggestions though on how to cover the functionality more thoroughly...how should I detect from a test that hot restart is disabled?

Release Notes: TBD: I'm not sure if release notes were added already in #2576 -- if not they can be added during this PR review.

*Fixes #2029 -- actually #2576 claims to fix that but I don't think it really does, since in that PR the switch is a no-op.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
@tonya11en tonya11en deleted the disable_hr_flag branch September 25, 2019 08:41
Shikugawa pushed a commit to Shikugawa/envoy that referenced this pull request Mar 28, 2020
…#2576)

* add option to release-binary to skip pushing docker image

* add more comment and address comment

* fix

* add env variable definition
Elite1015 pushed a commit to Elite1015/data-plane-api that referenced this pull request Feb 23, 2025
This is the update to the documentation that's required once the --disable-hot-restart cli flag PR is merged. See envoyproxy/envoy#2576.

Signed-off-by: Tony Allen <tallen@nutanix.com>
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.

Add CLI flag to disable hot restart

5 participants