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

[KNIFE-335] Wait for RackConnect and/or Service Level automation before bootstrapping #42

Merged
merged 14 commits into from Sep 3, 2013

Conversation

chrissnell
Copy link
Contributor

http://tickets.opscode.com/browse/KNIFE-335

I took kief's PR ( #35 ) and made some changes to make it work more reliably with a variety of different Rackspace Cloud environments.

Here's what I fixed:

kief's code only checks Chef::Config[:knife] to see if :rackconnect_wait is set. The CLI option was essentially being ignored. Fixed.

Next, I noticed that kief's code required that both the RackConnect automation and the Service Level automation had to be complete before moving on. For users of RackConnect who use the un-managed service level, this resulted in a hang waiting for rax_service_level_automation == 'Complete', which would never happen. I fixed this by splitting the service level automation wait into it's own CLI option, --rackspace-servicelevel-wait. I don't have a Managed service level account so I can't test this, unfortunately. Can someone with Managed Cloud with and without RackConnect test this?

Finally, I noticed that the code hangs waiting for sshd to open. This is because Fog's server.addresses data structure only contains the pre-RackConnect public IP. Once the RC automation runs, the server can only be accessed via the new "access IP". My fix is to pull this access IP using Fog's server.access_ipv4_address method and use this value if it exists.
Some discussion of this issue can be found here: fog/fog#1507 ... I believe that a more long-term fix in Fog itself is being discussed.

Big ups to Kief for creating the initial PR.

@kief
Copy link

kief commented May 3, 2013

Thanks Chris for whipping this into shape.

@jherdman
Copy link

What's the status of this pull request? It'd be great to see this merged in if it's working.

@mattray
Copy link
Contributor

mattray commented Jun 11, 2013

Right now Rackspace is managing the pull requests and tickets for knife-rackspace. I'll let @krames weigh in on their plans for testing and merging the ticket. Rebasing to the newly released 0.7.0 will make it easier to merge and we'll also need to get the CLAs for @chrissnell and @kief to be able to merge it into knife-rackspace.

http://wiki.opscode.com/display/chef/How+to+Contribute

@krames
Copy link
Contributor

krames commented Jun 11, 2013

@mattray @jherdman Let me review this PR and see if we can't get it into the next release.

@chrissnell
Copy link
Contributor Author

I worked on this as a Rackspace employee. Does Rackspace have an existing CLA that covers me?

@krames
Copy link
Contributor

krames commented Jun 11, 2013

@chrissnell I don't believe so. If you are not longer a Racker, you will need to sign your own contributor agreement (http://wiki.opscode.com/display/chef/How+to+Contribute). Alternatively, you can just wait for me to bless it.

If you are a racker send me an email and I can look into getting you added to our contributor agreement.

@chrissnell
Copy link
Contributor Author

Before this gets committed, I need to do some surgery on this PR. Everything after (and including) diff d887825 needs to get moved to a separate PR.

@krames
Copy link
Contributor

krames commented Jun 14, 2013

@chrissnell Thanks for letting me know!

@jherdman
Copy link

General question: shouldn't this logic be pushed into Fog?

@chrissnell
Copy link
Contributor Author

OK, the PR is cleaned up and ready for whatever you guys want to do with it. Thanks to @j2sol for the git surgery help.

@krames
Copy link
Contributor

krames commented Jun 25, 2013

@chrissnell Can rebase this? Thanks!

@sethvargo
Copy link

Hey @chrissnell @krames is there an internal JIRA ticket for this on tickets.opscode.com? If not, could you please create one, link to this PR, link this PR to the ticket, and mark the ticket as "Fix Provided" in JIRA?

@krames
Copy link
Contributor

krames commented Jul 12, 2013

@chrissnell Can you answer @sethvargo question? Thanks!

@chrissnell
Copy link
Contributor Author

Hi @sethvargo, JIRA ticket has been create:

http://tickets.opscode.com/browse/KNIFE-335

I wasn't able to mark it as 'Fix Provided'. Perhaps you can do that on your end.

@hatchetation
Copy link

FWIW, we're using @chrissnell 's branch very actively here at $job, and it's working great.

I've tested the following, all of which work as expected:

  • rackconnect_wait enabled with a managed instance
  • rackconnect_wait disabled with a managed instance
  • rackconnect_wait disabled, baseline functionality with a core account

Thanks to @chrissnell and @kief for their work on this -- it's much appreciated. 👍

@tomellis
Copy link

tomellis commented Aug 2, 2013

I've been actively using @chrissnell 's branch too over the past few weeks and it's working well.

Any progress on getting this merged?

@mattray
Copy link
Contributor

mattray commented Aug 10, 2013

Thanks! Merged to master.

@chrissnell @kief @krames If another pull request could be made with an update to the README explaining the use cases for this that would be very useful.

@mattray mattray closed this Aug 10, 2013
@krames
Copy link
Contributor

krames commented Aug 12, 2013

@mattray I will follow up with Chris on the docs. Thanks for the merge!

@tomellis
Copy link

tomellis commented Sep 2, 2013

did this really get merged to master? I can't see it there.

@DavidWittman
Copy link

@tomellis Doesn't look like it. @krames Mind reviewing this?

@krames
Copy link
Contributor

krames commented Sep 3, 2013

@DavidWittman Let me have a look.

@krames krames reopened this Sep 3, 2013
krames pushed a commit that referenced this pull request Sep 3, 2013
[KNIFE-335] Wait for RackConnect and/or Service Level automation before bootstrapping
@krames krames merged commit 6aee277 into chef-boneyard:master Sep 3, 2013
@krames
Copy link
Contributor

krames commented Sep 3, 2013

I am not quite sure what happened here. I have reopened the PR and merged it into master.

@mattray Can you cut another knife-rackspace release? Thanks!

@mattray
Copy link
Contributor

mattray commented Sep 3, 2013

0.8.1 was just pushed out with this fix.

martinb3 added a commit to martinb3/kitchen-rackspace that referenced this pull request Oct 5, 2015
Add the ability to wait for automation that runs on Managed Service Level Rackspace accounts.

Similar to the functionality in knife:
  chef-boneyard/knife-rackspace#42

Fixes test-kitchen#54.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants