Description of problem: Creating an instance using openstack server create fails when creating a blank Cinder volume: nova boot \ --nic net-id=$netid1 \ --flavor m1.master \ --image rhel-server-7.4 \ --key-name ocpkey \ --security-groups mastersg,nodesg \ --user-data=/home/stack/user-data/$node.yaml \ --block-device source=blank,dest=volume,device=vdb,size=15,shutdown=preserve \ servername Error: No volume with a name or ID of 'blank,dest=volume,device=vdb,size=15,shutdown=preserve' exists. This works: nova boot \ --nic net-id=$netid1 \ --flavor m1.master \ --image rhel-server-7.4 \ --key-name ocpkey \ --security-groups mastersg \ --block-device source=blank,dest=volume,device=vdb,size=15,shutdown=preserve \ servername This fails: opensatck server create \ --nic net-id=$netid1 \ --flavor m1.master \ --image rhel-server-7.4 \ --key-name ocpkey \ --security-group mastersg \ --block-device source=blank,dest=volume,device=vdb,size=15,shutdown=preserve \ servername Version-Release number of selected component (if applicable): python-openstackclient-3.2.1-2.el7ost.noarch
Moving this over to the Compute DFG as it's about server-related commands. From what I can tell from a quick look at the help, --block-device doesn't exist as an option in OSC. There is a --volume and a --block-device-mapping options though both appear to require a pre-existing volume, not sure how/if this can be done in the one step.
Disclaimer : I'm not an OSC expert, but I can read its code. From what I see, OSC doesn't have the same arguments for BDMs. If you want to ask for a specific BDM to be attached to an instance, the help command tells you : parser.add_argument( '--block-device-mapping', metavar='<dev-name=mapping>', action=parseractions.KeyValueAction, default={}, # NOTE(RuiChen): Add '\n' at the end of line to put each item in # the separated line, avoid the help message looks # messy, see _SmartHelpFormatter in cliff. help=_('Create a block device on the server.\n' 'Block device mapping in the format\n' '<dev-name>=<id>:<type>:<size(GB)>:<delete-on-terminate>\n' '<dev-name>: block device name, like: vdb, xvdc ' '(required)\n' '<id>: UUID of the volume or snapshot (required)\n' '<type>: volume or snapshot; default: volume (optional)\n' '<size(GB)>: volume size if create from snapshot ' '(optional)\n' '<delete-on-terminate>: true or false; default: false ' '(optional)\n' '(optional extension)'), so you really need to use --block-device-mapping '<dev-name>=<id>:<type>:<size(GB)>:<delete-on-terminate>' Could you please test that syntax and tell us if that works ? Thanks.
I have closed this bug as it has been waiting for more info for at least 2 weeks. We only do this to ensure that we don't accumulate stale bugs which can't be addressed. If you are able to provide the requested information, please feel free to re-open this bug.
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days