Skip to content

Creating a server returns a server object even if it the request failed. #10

Description

@tbartynski

I've tried creating an Ubuntu server by issuing the following command in my Ruby console:

s=azure.servers.create(:vm_name=>'atmo-azure-tb', :vm_user=>'root', :password=>'NOT_IMPORTANT', :image=>'b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-14_04_1-LTS-amd64-server-20150123-en-us-30GB',:location=>'North Central US')
Creating deploymnent...
Cloud service atmo-azure-tb already exists. Skipped...
Storage Account portalvhdswkd6qtd0zqkw9 already exists. Skipped...
Deployment in progress...
BadRequest : The Linux username 'root' is invalid.
=> #Fog::Compute::Azure::Server:0x4527db8

The console log indicates that there was an error creating the server; however spotting this error when invoking Fog programmatically (in my application) is more difficult since the create method simply returns a server object (which would fool the client into believing the operation was successful).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions