Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

undo quorum=true; wait for unit creation in fleetctl #1321

Merged
merged 2 commits into from
Aug 7, 2015

Conversation

mischief
Copy link
Contributor

@mischief mischief commented Aug 4, 2015

No description provided.


haserr := false
for msg := range errchan {
stderr("Error creating units: %v", msg)
Copy link
Contributor

Choose a reason for hiding this comment

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

"error waiting on unit creation" would be more accurate.

in testing with coretest, fleetd would get spurious errors while
creating and then reading back units. it is a race that occurs when a
PUT (consistent write to etcd) is immediately followed by a GET
(inconsistent read) to the same unit.

the real fix for this is to make use of etcd indexes everywhere in
fleetd, but unfortunately etcd 0.4.x indexes are broken. as a
workaround, we block in fleetctl waiting for acknowledgement of unit
creation before proceeding to load/start/etc.
@mischief
Copy link
Contributor Author

mischief commented Aug 5, 2015

@jonboulle looks useful, but not merged yet :(

@mischief
Copy link
Contributor Author

mischief commented Aug 5, 2015

PTAL

@mischief
Copy link
Contributor Author

mischief commented Aug 7, 2015

@marineam ping

@marineam
Copy link
Contributor

marineam commented Aug 7, 2015

LGTM

mischief added a commit that referenced this pull request Aug 7, 2015
undo quorum=true; wait for unit creation in fleetctl
@mischief mischief merged commit d6bef22 into coreos:master Aug 7, 2015
@mischief mischief deleted the wait-create branch August 7, 2015 22:10
@jonboulle
Copy link
Contributor

👍

@philips
Copy link
Contributor

philips commented Aug 11, 2015

@mischief multierror is merged.

@hawka
Copy link

hawka commented Sep 23, 2015

Can you explain why this was chosen over the use of quorum=true? What are the benefits to this approach?

@mischief
Copy link
Contributor Author

we maintain compatibility with etcd 0.4.x for now.

@marineam
Copy link
Contributor

iirc quorum=true wasn't a 0.4 limitation, it would just be overly expensive for a large fleet cluster to always use quorum=true for everything.

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