Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Conversation

@awh
Copy link
Contributor

@awh awh commented May 20, 2016

Fixes #2186.

Breaking change: weave launch is no longer idempotent (for inclusion in release notes).

@awh awh added this to the 1.6.0 milestone May 20, 2016
@rade
Copy link
Member

rade commented May 21, 2016

A side effect of the reversion of #1967 is that weave launch* is no longer idempotent, which is undesirable.

@rade
Copy link
Member

rade commented May 21, 2016

no longer idempotent

Though based on #2186 the intended semantics of weave launch[-router] is "Use supplied peer list only", which is non-monotonic, thus making idempotence awkward and perhaps of little value to users.

peers = storedPeers
} else {
log.Println("Initial set of peers:", peers)
if _, err := os.Stat("/restart.sentinel"); err == nil {

This comment was marked as abuse.

@rade
Copy link
Member

rade commented May 21, 2016

It seems rather inconvenient that re-launching the router clears the persisted peer list. It makes all changes to the configuration, e.g. changing the log level, lossy. Upgrades per #2303 are just a special case of that.

Perhaps we need another variant (or flag) for weave launch. After all, we do have a variant of weave connect, i.e. weave connect --replace <peer-list>.

@rade
Copy link
Member

rade commented May 21, 2016

strawman A: Add weave launch --replace.

  • when the weave container is restarted - we detect this via the sentinel file - the persisted peer list is used
  • when the weave container is launched with --replace, the command line peer list is used
  • when the weave container is launched without --replace, the union of the persisted peer list and the command line peer list is used

Downside: This is a change in the current behaviour of weave launch.

strawman B: make weave launch with any peers behave as "with --replace" above, and "without --replace" otherwise

Downside: This is still a change in current behaviour for the nil command line peer list case. It is also inconsistent with the weave connect --replace semantics (though we could change that to match).

strawman C: --add, i.e. the inverse of the --replace flag

Downside: Having a --replace flag for weave connect and the inverse flag for weave launch is inconsistent.

@awh awh force-pushed the issues/2186-peer-list-persistence branch from ad1a039 to 17857cd Compare May 24, 2016 08:37
@awh
Copy link
Contributor Author

awh commented May 24, 2016

@rade I think I would prefer weave launch --resume which does not allow the specification of any peers.

@awh awh force-pushed the issues/2186-peer-list-persistence branch from 88fd45d to f50ff01 Compare May 24, 2016 11:08
@awh
Copy link
Contributor Author

awh commented May 24, 2016

CC @abuehrle doc change

host# weave connect --replace $NEW_HOST1 $NEW_HOST2

If Weave Net is restarted by Docker it will automatically remember any
previous connect and forget operations, however if you stop it

This comment was marked as abuse.

@awh awh force-pushed the issues/2186-peer-list-persistence branch 5 times, most recently from 6468e1b to 8dfa320 Compare May 27, 2016 15:22
weave Outdated
deprecation_warnings "$@"
check_not_running router $CONTAINER_NAME $BASE_IMAGE
check_not_running proxy $PROXY_CONTAINER_NAME $BASE_EXEC_IMAGE
# Don't check the plugin here, since we start it with `--restart=always`

This comment was marked as abuse.

@bboreham
Copy link
Contributor

bboreham commented Jun 2, 2016

LGTM apart from one comment.

I guess we should note in the description the breaking change that weave launch is no longer idempotent, for inclusion in release notes.

@rade rade assigned awh Jun 2, 2016
@awh awh force-pushed the issues/2186-peer-list-persistence branch from 8dfa320 to 37f5a17 Compare June 3, 2016 12:53
@rade rade mentioned this pull request Jun 3, 2016
@awh awh removed their assignment Jun 3, 2016
@bboreham bboreham self-assigned this Jun 3, 2016
@bboreham bboreham merged commit 2728bc0 into master Jun 3, 2016
@bboreham bboreham deleted the issues/2186-peer-list-persistence branch November 9, 2016 17:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants