Skip to content
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

Switch Scaleway to salt.utils.cloud.bootstrap() #25549

Merged
merged 3 commits into from Jul 23, 2015

Conversation

techhat
Copy link
Contributor

@techhat techhat commented Jul 20, 2015

@edouardb, could you please take a look?

@jfindlay jfindlay added Salt-Cloud Medium Change RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. labels Jul 20, 2015
@@ -272,98 +272,11 @@ def __query_node_data(server_name):
finally:
raise SaltCloudSystemExit(str(exc))

ssh_username = config.get_cloud_config_value(
'ssh_username', server_, __opts__, default='root'
vm_['ssh_host'] = ip_address

Choose a reason for hiding this comment

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

vm_ doesn't exist should be server_, same thing for next occurrences

Choose a reason for hiding this comment

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

ip_address is not defined should be assigned from data['public_ip']['address']

if data.get('public_ip') is not None:
  ip_address = data['public_ip']['address']

@edouardb
Copy link

Hi @techhat,

After fixing the code I run some test on the create function and I get the following error:

Error: There was a query error: Cannot deploy salt in a VM if the 'ssh_keyfile' setting is not set and there is no password set for the vm. Check your provider for the 'change_password' option.

Any idea why?

Thanks

@techhat
Copy link
Contributor Author

techhat commented Jul 20, 2015

@edouardb, fixed. Do you have any comments on ssh_password or ssh_keyfile? One or both needs to be specified, and I didn't see either in your code.

@techhat
Copy link
Contributor Author

techhat commented Jul 20, 2015

@edouardb check my other question to you, it should answer your question to me.

@edouardb
Copy link

Right! 😄

You can keep ssh_password which is not required by default as we use key but it can be useful to have both.

I re-run the test adding key_filename instead of ssh_keyfile in my config and everything is fine.

Thanks 👍

@techhat
Copy link
Contributor Author

techhat commented Jul 20, 2015

@edouardb ssh_key or ssh_keyfile?

@edouardb
Copy link

@techhat ssh_keyfile

@edouardb
Copy link

Line 209 and 384, 'provider': server_['provider'] must be changed to 'driver' : server_['driver'] to prevent salt to raise the following exception:

[ERROR   ] Failed to create VM XXX. Configuration value 'provider' needs to be set
Traceback (most recent call last):
  File "/root/salt/salt/cloud/__init__.py", line 1256, in create
    output = self.clouds[func](vm_)
  File "/root/salt/salt/cloud/clouds/scaleway.py", line 209, in create
    'provider': server_['provider'],
KeyError: 'provider'

and

[ERROR   ] Failed to create VM XXX. Configuration value 'provider' needs to be set
Traceback (most recent call last):
  File "/root/salt/salt/cloud/__init__.py", line 1256, in create
    output = self.clouds[func](vm_)
  File "/root/salt/salt/cloud/clouds/scaleway.py", line 384, in create
    'provider': server_['provider'],
KeyError: 'provider'

@rallytime
Copy link
Contributor

@edouardb Thanks for testing this. Those stacktraces should be fixed in #25575 that I've referenced above.

@rallytime
Copy link
Contributor

Go Go Jenkins!

@techhat
Copy link
Contributor Author

techhat commented Jul 20, 2015

Thanks @rallytime. Please hold off on merging for a moment, @edouardb and I are still working on the ssh_keyfile issue.

@jfindlay jfindlay added the pending-changes The pull request needs additional changes before it can be merged label Jul 21, 2015
@techhat
Copy link
Contributor Author

techhat commented Jul 23, 2015

I have been unable to reproduce this issue. In fact, without this code I can spin up a machine but not provision it, but with this code, the machine is provisioned.

@rallytime rallytime added Tests-Passed and removed pending-changes The pull request needs additional changes before it can be merged labels Jul 23, 2015
rallytime pushed a commit that referenced this pull request Jul 23, 2015
Switch Scaleway to salt.utils.cloud.bootstrap()
@rallytime rallytime merged commit a4aaa7a into saltstack:2015.8 Jul 23, 2015
@techhat techhat deleted the scalewaybootstrap branch July 23, 2015 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. Salt-Cloud Tests-Passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants