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

salt-cloud actions don't have very useful error messages #10157

Closed
martinb3 opened this issue Feb 3, 2014 · 2 comments
Closed

salt-cloud actions don't have very useful error messages #10157

martinb3 opened this issue Feb 3, 2014 · 2 comments
Assignees
Labels
Feature new functionality including changes to functionality and code refactors, etc. fixed-pls-verify fix is linked, bug author to confirm fix RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. Salt-Cloud
Milestone

Comments

@martinb3
Copy link

martinb3 commented Feb 3, 2014

salt-cloud doesn't have great error messages when asked to operate on a minion that doesn't exist, e.g.:

[root@martin-salt-master ~]# salt-cloud -a show_instance martin-salt-minion1 
[INFO    ] salt-cloud starting
The following virtual machines are set to be actioned with "show_instance":
  martin-salt-minion1

Proceed? [N/y] y
... proceeding
Not Actioned/Not Running:

It would be useful if a node is unreachable or not found to show a better error message. @techhat suggested I file this issue.
- martin-salt-minion1

@techhat
Copy link
Contributor

techhat commented Feb 4, 2014

Thanks for filing this, @martinb3. It would definitely be good to improve this.

@basepi basepi modified the milestones: Approved, Helium Apr 21, 2014
@jfindlay jfindlay added the RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. label Jun 9, 2015
@rallytime
Copy link
Contributor

@martinb3 I just added some more helpful error messaging to the salt-cloud -a command with #30554. Basically, this helps in two ways. The first way is to list which VMs could not be found, in addition to a complete list of VMs that weren't actioned (including the vm that couldn't be found.)

The second way is that it lists which vms were not able to be actioned because the given action isn't a valid option for the cloud-provider in question. For example, if an action is available on Digital Ocean, but not Rackspace, and VMs from both drivers were listed on the CLI, the output will tell you that the vm on Rackspace wasn't actioned because the function is available.

Here's some examples:

# salt-cloud -a bad_function rally-to-clone rallytime fake softlayer
[INFO    ] salt-cloud starting
The following virtual machines are set to be actioned with "bad_function":
  rally-to-clone
  rallytime
  fake
  softlayer

Proceed? [N/y] y
... proceeding
[INFO    ] POST https://api.softlayer.com/xmlrpc/v3.1/SoftLayer_Account
[INFO    ] 'softlayer.bad_function()' is not available. Not actioning...
[INFO    ] 'linode.bad_function()' is not available. Not actioning...
Invalid Actions:
    ----------
    linode.bad_function:
        - rally-to-clone
        - rallytime
    softlayer.bad_function:
        - softlayer
Not Actioned/Not Running:
    - rally-to-clone
    - softlayer
    - rallytime
    - fake
Not Found:
    - fake
#
#
# salt-cloud -a show_instance rallytime fake
[INFO    ] salt-cloud starting
The following virtual machines are set to be actioned with "show_instance":
  rallytime
  fake

Proceed? [N/y] y
... proceeding
[INFO    ] POST https://api.softlayer.com/xmlrpc/v3.1/SoftLayer_Account
Not Actioned/Not Running:
    - fake
Not Found:
    - fake
linode-config:
    ----------
    linode:
        ----------
        rallytime:
            ----------
            id:
                1284902
            image:
                Ubuntu
            name:
                rallytime
            private_ips:
                - <redacted>
            public_ips:
                - <redacted>
            size:
                2048
            state:
                Running

@rallytime rallytime added fixed-pls-verify fix is linked, bug author to confirm fix TEAM RIoT labels Jan 22, 2016
@rallytime rallytime modified the milestones: B 4, Approved Jan 22, 2016
@rallytime rallytime self-assigned this Jan 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature new functionality including changes to functionality and code refactors, etc. fixed-pls-verify fix is linked, bug author to confirm fix RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. Salt-Cloud
Projects
None yet
Development

No branches or pull requests

5 participants