-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLOC-3739] Failover acceptance test enabled #2546
Open
itamarst
wants to merge
10
commits into
master
Choose a base branch
from
failover-acceptance-test-FLOC-3739
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
585f093
Start ICloudAPI change.
itamarst dc5ba06
FakeCloudAPI updated, and test for listing appropriate IPs.
itamarst e2437dd
Don't use env variable anymore to find public IPs for nodes.
itamarst 920e2a8
Lint fix.
itamarst 4e96474
A couple minor usage bug fixes.
itamarst 5e847f8
Merge branch 'acceptance-tests-prep-for-node-shutdown-FLOC-3983' into…
itamarst 46ac178
Fix EBS node start to actually work.
itamarst 3d50b57
Passing test, albeit with non-ideal cleanup code.
itamarst 380633e
Nicer cleanup after the test.
itamarst fdd7f9d
News entry.
itamarst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,7 @@ | |
_backing_file_name, | ||
) | ||
from ....common.algebraic import tagged_union_strategy | ||
|
||
from ....common import get_all_ips | ||
|
||
from ... import run_state_change, in_parallel, ILocalState, IStateChange, NoOp | ||
from ...testtools import ( | ||
|
@@ -754,7 +754,12 @@ def __init__(self, block_api, live_nodes=()): | |
self.live_nodes = live_nodes | ||
|
||
def list_live_nodes(self): | ||
return [self.compute_instance_id()] + list(self.live_nodes) | ||
result = {self.compute_instance_id(): | ||
set(unicode(i) for i in get_all_ips() | ||
if i != b"127.0.0.1")} | ||
result.update({node: [u"10.1.1.{}".format(i)] | ||
for i, node in enumerate(self.live_nodes)}) | ||
return result | ||
|
||
def start_node(self, node_id): | ||
return | ||
|
@@ -5501,11 +5506,25 @@ def test_current_machine_is_live(self): | |
self.assertIn(self.api.compute_instance_id(), live)) | ||
return d | ||
|
||
def test_current_machine_has_appropriate_ip(self): | ||
""" | ||
The machine's known IP is set for the current node. | ||
""" | ||
local_addresses = set(unicode(i) for i in get_all_ips() | ||
if i != b"127.0.0.1") | ||
d = self.async_cloud_api.list_live_nodes() | ||
d.addCallback( | ||
lambda live: | ||
self.assertTrue( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does assertIn work here? |
||
set(live[self.api.compute_instance_id()]).intersection( | ||
local_addresses))) | ||
return d | ||
|
||
def test_list_live_nodes(self): | ||
""" | ||
``list_live_nodes`` returns an iterable of unicode values. | ||
""" | ||
live_nodes = self.api.list_live_nodes() | ||
live_nodes = list(self.api.list_live_nodes()) | ||
self.assertThat(live_nodes, AllMatch(IsInstance(unicode))) | ||
|
||
return Tests | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anything that prevents someone trying this on Rackspace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried it on Rackspace manually. It doesn't work due to Rackspace bugs. It does work on OpenStack elsewhere (at least on Swisscom's cluster) but I don't want to claim that publicly until we can enable the acceptance tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but is it a matter of hoping that no one tries it? If so are we
happy with that?
On Fri, 29 Jan 2016 at 14:31, Itamar Turner-Trauring <
[email protected]> wrote: