Ask Your Question

IRSHAD's profile - activity

2017-06-20 11:53:34 -0500 received badge  Famous Question (source)
2017-06-20 11:53:34 -0500 received badge  Notable Question (source)
2017-02-21 08:11:58 -0500 received badge  Famous Question (source)
2016-12-19 07:26:49 -0500 received badge  Notable Question (source)
2016-09-20 12:04:13 -0500 received badge  Teacher (source)
2016-09-20 12:04:13 -0500 received badge  Self-Learner (source)
2016-09-20 12:01:26 -0500 received badge  Famous Question (source)
2016-09-20 12:01:21 -0500 received badge  Popular Question (source)
2016-08-24 03:33:39 -0500 answered a question how to pass the template url in curl command for stack creation.

finally got it: template file should be placed in below path: /var/www/html/

curl -s http://<controller_ip>:8004/v1/<tenant_id>/stacks \
-H "X-Auth-Token: "<token_id>"" \
-H "User-Agent: python-heatclient" \
-H "Content-type":"application/json" \
-H "Accept: application/json" \
-d '{"files": {}, "disable_rollback": true, "parameters": {}, "stack_name": "test", "environment": {}, "template_url": "http://<controller_ip>/test.yaml" }' \
 | python -m json.tool
2016-08-24 01:53:27 -0500 asked a question how to pass the template url in curl command for stack creation.

I am creating a stack using below curl command and it will successfully created-

curl -s http://<controller_ip>:8004/v1/<tenant_id>/stacks \
-H "X-Auth-Token: "<token_id>"" \
-H "User-Agent: python-heatclient" \
-H "Content-type":"application/json" \
-H "Accept: application/json" \
-d '{"files": {}, "disable_rollback": true, "parameters": {}, "stack_name": "test", "environment": {}, "template": {"heat_template_version": "2015-10-15", "description": "Simple template to deploy a single compute instance", "parameters": null, "resources": {"myport": {"type": "OS::Neutron::Port", "properties": {"network_id": "<net_id>", "fixed_ips": [{"subnet": "<subnet_name>", "ip_address": "<ip_address>"}], "name": "<port_name>"}}}}}' \
 | python -m json.tool

but i want to specify the template_url instead of mentioning complete template in the curl command. Anyone has idea about it how to specify the template url i.e. test.yaml

When i'm going to try with template_url parameters it will throw an error "Bad Request"

curl -s http://<controller_ip>:8004/v1/<tenant_id>/stacks \
-H "X-Auth-Token: "<token_id>"" \
-H "User-Agent: python-heatclient" \
-H "Content-type":"application/json" \
-H "Accept: application/json" \
-d '{"files": {}, "disable_rollback": true, "parameters": {}, "stack_name": "test", "environment": {}, "template_url": "test.yaml" }' \
 | python -m json.tool
2016-08-23 05:26:26 -0500 received badge  Scholar (source)
2016-08-23 05:26:03 -0500 answered a question Is there any way to assign private static ip using heat?

I have created on template for my own question and its working fine now.

resources:
   my_port:
      type: OS::Neutron::Port
      properties:
          name: "port1"
          network_id: "<net_id>"
          fixed_ips: [{"subnet": "<subnet_name>", "ip_address": 10.10.10.15}]

   my_vm:
      type: OS::Nova::Server
      properties:
          name: "testvm"
          image: { get_param: var_Image }
          flavor: "m1.tiny"
          networks:
          - port: { get_resource: my_port }

Now heat will create a new vm with defined ip i.e. 10.10.10.15

2016-08-23 04:42:28 -0500 received badge  Notable Question (source)
2016-08-22 06:47:27 -0500 received badge  Popular Question (source)
2016-08-22 06:03:48 -0500 commented question Is there any way to assign private static ip using heat?

you are telling about this

neutron port-create net1 --fixed-ip ip_address=10.10.10.15 <net-id>
nova boot --image <img> --flavor <flavor> --nic port-id=<port-id> <vm-name>

but i want to create this using heat template

2016-08-22 05:56:56 -0500 commented answer Is there any way to assign private static ip using heat?

Thanks for reply but you are telling from horizon perspective. I need to create vm using heat with static ip as i have posted above template of the heat.

2016-08-22 04:00:28 -0500 commented answer How to assign fixed ip Using Heat Template?

question is how to assign the fixed ip? From the example given above is using dhcp to assign ip address. Is there any way using heat template to assign static ip.

2016-08-22 01:52:04 -0500 asked a question Is there any way to assign private static ip using heat?

I want to assign private static ip to the VM using heat. Currently dhcp allocates the ip but i want to give the ip address during launching a vm using heat.

what is going wrong here to assign fixed ip:

resources:
   my_port:
      type: OS::Neutron::Port
      properties:
          name: "port1"
          network_id: { get_param: internal_network }
          fixed_ips:
          - subnet_id: "<subnet_id>"
          - ip_address: 10.10.10.15          
          #fixed_ips: [{"subnet": "my_subnet", "ip_address": "10.10.10.15"}]

   my_vm:
      type: OS::Nova::Server
      properties:
          name: "testvm"
          image: { get_param: var_Image }
          flavor: "m1.tiny"
          networks:
          - port: { get_resource: my_port }

Error message: heatclient.exc.HTTPBadRequest: ERROR: Property error: : resources.my_port.properties.fixed_ips[1].ip_address: : "10.10.10.15" does not validate ip_addr (constraint not found)

2016-05-31 05:41:22 -0500 answered a question Can Ping but Can't SSH to Instances

I had the same issue, and by changing the mtu size it is working fine. i.e. ifconfig <interface> mtu <mtu_size>

2016-04-23 20:09:22 -0500 received badge  Popular Question (source)
2015-11-19 01:07:33 -0500 answered a question Heat template for flat network

I have done this using the below script. May be helpful for others-

heat_template_version: 2014-10-16
description: Template to create a tenant network along with router config

parameters:
    ImageId:
        type: string
        label: cirros-0.3.2-x86_64
        description: cirros-0.3.2-x86_64

resources:
    demo-net:
        type: OS::Neutron::Net
        properties:
            name: demo-net

    demo-subnet:
        type: OS::Neutron::Subnet
        properties:
            name: demo-subnet
            network_id: { get_resource: demo-net }
            cidr: 10.10.0.0/24
            gateway_ip: 10.10.0.1

    my_instance:
        type: OS::Nova::Server
        properties:
            name: "demo_test_nw_01"
            image: { get_param: ImageId }
            flavor: "m1.tiny"
            networks:
            - network : { get_resource: demo-net }
2015-11-19 00:56:48 -0500 answered a question Cannot assign instance to a given network from Python novaclient API

This will help you in better way.

   image=nova.images.find(name="Ubuntu 12.10 cloudimg amd64") 
   flavor=nova.flavors.find(name="m1.tiny")
   my-nic= [{"net-id": myNet.id, "v4-fixed-ip": str(ip_address)}]
   instance=nova.servers.create(name="samplehost", image=image, flavor=flavor,nics=my-nic)
2015-11-05 20:36:16 -0500 received badge  Famous Question (source)
2015-10-09 00:55:34 -0500 received badge  Notable Question (source)
2015-10-09 00:55:34 -0500 received badge  Popular Question (source)
2015-09-30 04:10:48 -0500 answered a question flat and vlan network creation shows error-"No tenant network is available for allocation"

Hi Vikrant, Thanks for reply. I'm creating the tenant network after successfully created the external network associated with physnet2 using the below command- neutron net-create external2 --shared --provider:physical_network physnet2 --provider:network_type flat --router:external=True Here error is coming while creating the tenant network that would be used as an internal network using the below command- neutron net-create internal2

your suggested command is showing the below error-

neutron net-create internal2 --shared --provider:physical_network=physnet2 --provider:network_type=vlan
400-{u'NeutronError': {u'message': u"Invalid input for operation: network_type value 'vlan' not supported.", u'type': u'InvalidInput', u'detail': u''}}

 neutron net-create internal2 --shared --provider:physical_network=physnet2 --provider:network_type=flat
409-{u'NeutronError': {u'message': u'Unable to create the flat network. Physical network physnet2 is in use.', u'type': u'FlatNetworkInUse', u'detail': u''}}


 neutron net-create internal2
503-{u'NeutronError': {u'message': u'Unable to create the network. No tenant network is available for allocation.', u'type': u'NoNetworkAvailable', u'detail': u''}}
2015-09-30 01:33:23 -0500 answered a question Unable to create the network. No tenant network is available for allocation.

Hi dbaxps, I have similar issue in Icehouse 2-node setup and after trying with your comment to put core_plugin and service_plugins in neutron.conf i'm getting the same issue- "No tenant network is available". detailed explanation is also available at below path-

https://ask.openstack.org/en/question...

2015-09-30 01:24:49 -0500 received badge  Editor (source)
2015-09-30 00:39:39 -0500 asked a question flat and vlan network creation shows error-"No tenant network is available for allocation"

I have configured 1 flat network and during creation of vlan network i.e. tenant network, it shows below error-

# neutron net-create internal2 --tenant-id=admin

503-{u'NeutronError': {u'message': u'Unable to create the network. No tenant network is available for allocation.', u'type': u'NoNetworkAvailable', u'detail': u''}}

openstack Icehouse is used for 2-Node setup where network node is configured in controller machine-

ml2_conf file:

[ml2]
type_drivers = vlan,flat
tenant_network_types = vlan
mechanism_drivers = openvswitch

[ml2_type_flat]
flat_networks = physnet1

[ml2_type_vlan]
network_vlan_ranges = physnet2:1000:2999

[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
enable_security_group = True
enable_ipset = True

[ovs]
local_ip = #management_Ip#
tenant_network_type = vlan
bridge_mappings = physnet1:br-ex,physnet2:br-ex3
integration_bridge = br-int
network_vlan_ranges = physnet2:1000:2999

neutron.conf file-

core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin
service_plugins=neutron.services.l3_router.l3_router_plugin.L3RouterPlugin
allow_overlapping_ips = True

What is going wrong in my mixed flat+vlan network configuration?

2015-09-28 01:36:34 -0500 answered a question neutron error while launching with heat

I have the similar kind of issue. what is going wrong in the below yml file for creating the flat network-

It gives error- Resource Create Failed: Neutronclientexception: 503-{U'Neutronerror': {U'Message': U'Unable To Create The Network. No Tenant Network Is Available For Allocation.', U'Type': U'Nonetworkavailable', U'Detail': U''}}

heat_template_version: 2013-05-23
description: Simple template to create a flat network

resources:
  provider_01:
     type: OS::Neutron::ProviderNet
     properties:
       physical_network: physnet2
       shared: true
       network_type: flat
  network_01:
    type: OS::Neutron::Net
    properties:
       admin_state_up: true
       name: External2
       shared: true
       #admin tenant id
       tenant_id: "6ec23610836048ddb8f9294dbf89a41e"
  subnet_01:
    type: OS::Neutron::Subnet
    properties:
       name: Subnet2
       network_id: { get_resource: network_01 }
       cidr: 192.168.56.0/24
       gateway_ip: 192.168.56.1
       allocation_pools: [{"start": 192.168.56.50, "end": 192.168.56.70}]
       enable_dhcp: true
  port_01:
    type: OS::Neutron::Port
    properties:
       admin_state_up: true
       network_id: { get_resource: network_01 }
       #security_groups: "default"
2015-09-28 01:24:47 -0500 answered a question network diagram for flat network multinode

I think below diagram will help you to understand how many NICs are needed for your multinode setup.

Multinode architecture

2015-09-28 01:09:55 -0500 received badge  Enthusiast
2015-09-27 23:44:54 -0500 received badge  Famous Question (source)
2015-09-27 23:44:54 -0500 received badge  Notable Question (source)
2015-09-27 23:43:09 -0500 received badge  Popular Question (source)
2015-09-24 07:57:33 -0500 received badge  Popular Question (source)
2015-09-24 06:18:02 -0500 asked a question Icehouse Heat, Unable to create the network. No tenant network is available for allocation

I have configured 2-Node Openstack(Icehouse) setup and heat is also configured. when creating instance using HOT template it is successfully launched. But when I'm trying to create the flat network using my yml file it shows below error-

> "Unable to create the network. No tenant network is available for allocation"

my yml file is:

heat_template_version: 2013-05-23
description: Simple template to deploy a flat network
resources:
  provider_01:
     type: OS::Neutron::ProviderNet
     properties:
       physical_network: physnet2
       shared: true
       network_type: flat
  network_01:
    type: OS::Neutron::Net
    properties:
       admin_state_up: true
       name: External2
       shared: true
       #tenant_id: 6ec23610836048ddb8f9294dbf89a41e
  subnet_01:
    type: OS::Neutron::Subnet
    properties:
       name: Subnet2
       network_id: { get_resource: network_01 }
       cidr: 192.168.56.0/24
       gateway_ip: 192.168.56.1
       allocation_pools: [{"start": 192.168.56.50, "end": 192.168.56.70}]
       enable_dhcp: true
  port_01:
    type: OS::Neutron::Port
    properties:
       admin_state_up: true
       network_id: { get_resource: network_01 }
       #security_groups: "default"
2015-09-24 01:36:07 -0500 asked a question Heat template for flat network

trying to create a network with heat_template_version: 2013-05-23 but it shows below error-

 Resource Create Failed: Neutronclientexception: 503-{U'Neutronerror': {U'Message': U'Unable To Create The Network. No Tenant Network Is Available For Allocation.', U'Type': U'Nonetworkavailable', U'Detail': U''}}

resources:
  network_01:
    type: OS::Neutron::Net
    properties:
       admin_state_up: true
       name: External2
       shared: true
       #admin tenant id
       tenant_id: 6ec23610836048ddb8f9294dbf89a41e

2015-09-23 07:20:22 -0500 commented question Error communicating with http://controller:8777 [Errno 111] Connection refused

I have similar issue in Icehouse, os:ubuntu14.04. can anybody help to resolve this issue.