User talk:Udaykumar.kaja

Openstack Issue & Possible soultions

If volume struck in a state

Try below cinder reset command if not continue below cinder reset-state --state available 4321a8ee-bcf0-416e-a541-ed8f046c5823 In cinder execute the below stepscinder db mysql cinder SELECT id,status,attach_status from volumes; SELECT id,status,attach_status,attach_status from volumes; UPDATE volumes SET status="available", attach_status="detached" WHERE id="4321a8ee-bcf0-416e-a541-ed8f046c5823";

Unable to retrieve volume limit Information "Danger: There was an error submitting the form. Please try agian"

Make changes of /etc/cinder/cinder.conf encryption_auth_url = http://IP_TO_KEYSTONE:5000/v3 auth_url = http://IP_TO_KEYSTONE:5000 restart cinder services and you should be good to go, hopefully that helps

[keystone_authtoken] auth_uri = http:// :5000 auth_url = http:// :35357 auth_plugin = password project_domain_id = default user_domain_id = default project_name = services username = cinder password = 28a9b0bd83054888 

CLI command to create an Image

login to the controller glance image-create --name  --is-public true --disk-format --container-format bare --file glance image-create --name "Centos 7" --is-public true --disk-format iso --container-format bare --file CentOS-7-x86_64.iso

Error 113 EHOUSTUNREACH IP rules are not allowing, try to add an Ip rule For more inforamtion refer: https://access.redhat.com/solutions/2148701

Critical keystone error:address already in use Port 35357/5000 is used by another application

Restart Services Restart Compute services: # service openstack-nova-api restart # service openstack-nova-cert restart # service openstack-nova-consoleauth restart # service openstack-nova-scheduler restart # service openstack-nova-conductor restart # service openstack-nova-novncproxy restart

Restart Networking services. # service neutron-server restart # service neutron-dhcp-agent restart # service neutron-l3-agent restart # service neutron-metadata-agent restart

Networking plug-in agent. # service neutron-openvswitch-agent restart

Cinder Services restart # service openstack-cinder-api restart # service openstack-cinder-backup restart # service openstack-cinder-scheduler restart # service openstack-cinder-volume restart

On ubuntu run # service --status-all | grep nova # service --status-all | grep neutron

Multiple node Openstack liberty installation on centos 7 Link : http://www.linuxtechi.com/multiple-node-openstack-liberty-installation-on-centos-7-x/

Devstack All-in-one installation Link : http://docs.openstack.org/developer/devstack/guides/single-machine.html

To know the configuration of ther Server Command : sudo dmidecode Sample Output: Handle 0x0000, DMI type 0, 24 bytes BIOS Information Vendor: HP       Version: P70 Release Date: 03/01/2013 Address: 0xF0000 Runtime Size: 64 kB       ROM Size: 8192 kB        Characteristics: PCI is supported PNP is supported BIOS is upgradeable BIOS shadowing is allowed ESCD support is available Boot from CD is supported Selectable boot is supported EDD is supported

Configure Static IP in Ubuntu Server Steps to be followed Tempory erased if restarted sudo ifconfig eth1 10.2.3.2 netmask 255.255.255.0 and vi /etc/network/interfaces iface eth0 inet static address 10.2.3.2 netmask 255.255.255.0 gateway 10.2.3.1 service networking restart reboot

Convert qcow2 to raw --qcow to iso Link: http://docs.openstack.org/image-guide/convert-images.html Link: https://sourceforge.net/projects/iso-m2f1/

Unable to launch Instance: Useful Tips use different images cirros(iso, qcow) Add security group rules space df -h openstack-status openstack console url show instancename nova --os-tenant-name "Xura-Voicemail" --os-username ukumar --os-user-id ukumar --os-password **** --os-auth-url http://166.34.122.20:5000/v2.0 list glanace --os-tenant-name admin --os-username admin --os-user-id admin --os-password Keystone2018 --os-auth-url http://166.44.165.157:5000 image-list nova --os-tenant-name admin --os-username admin --os-user-id admin --os-password Keystone2018 --os-auth-url http://166.44.165.157:35357 list (for playbooks) service rabbitmq-server status ;   rabbitmqctl cluster_status restart services-- openstack-service restart nova instance qutos vi /var/log/nova/nova.log | grep error

check tap device of VM: virsh list virsh dumpxml 2 | grep dev tcpudmp -ni tap02354c78-9f

nova reset-state --active instanceid nova service-list nova-manage service list nova hypervisor-list nova quota-defaults nova floating-ip-list nova flavor-list nova show vm1 nova get-vnc-console instanceName VNCType=try novnc to get url of VM: nova boot --image 05cc5ec9-44c9-42a5-a796-d7812cba5f1a --flavor m1.large --nic net-id=231121c7-e9ec-4735-9db6-7676f0527e86 vm1 nova boot --image 05cc5ec9-44c9-42a5-a796-d7812cba5f1a --flavor m1.large --nic net-id=231121c7-e9ec-4735-9db6-7676f0527e86 :host1 vm1 ---can choose on which host should a VM be launched.

neutron agent-list neutron port-list neutron port-show neutron router-list neutron net-show --fields provider:segmentation_id neutron --debug port-chain-delete     PC1 cat /var/lib/neutron/dhcp/ /host  ---shows mac address of VM, (lease file). ovs-vsctl del-br br-tun service neutron-plugin-openvswitch-agent stop ovs-vsctl show tcpdump -i tap1999be5c-33

sudo ip netns list --show qrouter,qdhcps ip netns exec qdhcp-fd7b4b33-c07e-4f3e-86de-96580cce0acc ifconfig ip netns exec qdhcp-fd7b4b33-c07e-4f3e-86de-96580cce0acc ping -c 192.168.2.10 ip netns exec qdhcp-d7e23e5a-b671-4c75-9f17-b1062051dc62 ssh cirros@10.10.10.13 ip netns exec qrouter-fd7b4b33-c07e-4f3e-86de-96580cce0acc sudo ovs-ofctl dump-flows br-int  ---of-open flow---dump all the flows installed on the machine sudo ovs-ofctl show br-int sudo ovs-ofctl monitor br-int

log files in openstack -- /var/log/nova/, /var/log/keystone, /var/log/apache2 /var/log/  | less ___shift g --to go to end of log file cat /var/log/messages |grep -i network cat /var/log/neutron/neutron-dhcp |grep error|tail -n 30 less /etc/sysconfig/network-scripts/ifcfg-enp3s0f0 ps -eaf | grep dnsmasq

Service function chaining

- neutron port-create --name np1 n1 - neutron port-create --name np2 n1 - neutron port-create --name np3 n1 - neutron port-create --name np4 n1 - nova boot --image 3ef62d01-48bb-4c35-aaea-6ed25394cd62 --flavor m1.tiny --nic port-id=f93fe4b7-baf4-46a0-a791-7af8cf1d7ab5 --nic port-id=754279d4-492d-48f5-bed1-92647873c0b5 vm1 - nova boot --image 3ef62d01-48bb-4c35-aaea-6ed25394cd62 --flavor m1.tiny --nic port-id=8d819b28-914b-4b28-a4bd-5b457cb1de3c --nic port-id=d1858811-dc59-4d4c-b207-e5ef78164d64 vm2 - neutron port-pair-create --ingress=np1 --egress=np2 pp1 - neutron port-pair-create --ingress=np3 --egress=np4 pp2 - neutron port-pair-list - neutron port-pair-group-create --port-pair pp1 --port-pair pp2 pg1 - neutron port-pair-group-list - neutron flow-classifier-create --ethertype IPv4 --source-ip-prefix 10.10.10.5/24 --logical-source-port np1 --logical-destination-port np4 --destination-ip-prefix 10.10.10.16/24 -- protocol tcp --source-port 23:23 --destination-port 100:100 fc1 - neutron port-chain-create --port-pair-group pg1 --flow-classifier fc1 pc1 - neutron port-chain-list

Link: http://docs.openstack.org/developer/networking-sfc/api.html Link: http://docs.openstack.org/developer/networking-sfc/system_design%20and_workflow.html Link: https://wiki.openstack.org/wiki/Neutron/ServiceInsertionAndChaining ---installation

NEXT TASKS

OPENSTACK KOLLA OPENSTACK ANSIBLE _ ALL IN ONE --If you are not ROOT, u cant see any lxc x --bootstrap coomands nuch anni commands ROOT tho excuite cheyali --cd /opt/anisble/ lo undali --it takes more time, wait until you get an error. If you dont get error, you are fine.

/opt/openstack-ansible sudo -s
 * 1) apt-get dist-upgrade
 * 2) reboot
 * 3) git clone https://github.com/openstack/openstack-ansible \
 * 1) cd /opt/anisble
 * 2) git tag -l
 * 3) git checkout stable/mitaka
 * 4) git describe --abbrev=0 --tag
 * 1) scripts/bootstrap-ansible.sh
 * 2) scripts/bootstrap-aio.sh
 * 3) scripts/run-playbooks.sh

http://docs.openstack.org/developer/openstack-ansible/developer-docs/quickstart-aio.html

CONFIGURE OPENSTACK USING CLI

Create private network. # neutron net-create private # neutron subnet-create private 10.10.1.0/24 --name private_subnet --allocation-pool start=10.10.1.100,end=10.10.1.200

Create public network : these steps assume the physical network connected to eth0 is 192.168.122.0/24. # neutron net-create public --router:external # neutron subnet-create public 192.168.122.0/24 --name public_subnet --allocation-pool start=192.168.122.100,end=192.168.122.200 --disable-dhcp --gateway 192.168.122.1

Add a new router and configure router interfaces. # neutron router-create router1 --ha False # neutron router-gateway-set router1 public # neutron router-interface-add router1 private_subnet

Upload a glance image # yum install -y wget # wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img # glance image-create --name "Cirros 0.3.4" --disk-format qcow2 --container-format bare --visibility public --file /root/cirros-0.3.4-x86_64-disk.img

Create a new m1.nano flavor # nova flavor-create m1.nano 42 64 0 1

Create security group and allow all TCP ports. # nova secgroup-create all "Allow all tcp ports" # nova secgroup-add-rule all TCP 1 65535 0.0.0.0/0

Create security group for base access # nova secgroup-create base "Allow Base Access" # nova secgroup-add-rule base TCP 22 22 0.0.0.0/0 # nova secgroup-add-rule base TCP 80 80 0.0.0.0/0 # nova secgroup-add-rule base ICMP -1 -1 0.0.0.0/0

Create a private ssh key for connecting to instances remotely. # nova keypair-add admin

Create admin.pem file and add private key from output of keypair-add command. # vi /root/admin.pem # chmod 400 /root/admin.pem

List the network IDs. # neutron net-list

Start an instance # nova boot --flavor m1.nano --image "Cirros 0.3.4" --nic net-id=92d82f53-6e0b-4eef-b8b9-cae32cf40457 --key-name admin --security-groups all mycirros

Create a floating IP and assign it to the mycirros instance. # nova floating-ip-create # nova floating-ip-associate mycirros 

Connect to mycirros instance using the private ssh key stored in the admin.pem file. Note: The first floating IP in the range 192.168.122.201 # ssh -i admin.pem cirros@192.168.122.201

YUM update issue Set your proxy in environment variables export http_proxy= http://xxxxx.com:80 To permanently add it to the linux do the below $ vi /root/.bashrc #add lines at the bottom of the file: export http_proxy=http://idcproxy.vzbi.com:80 To unset proxy : unset http_proxy/unset https_proxy

Interface addtion to existing Instance
 * 1) neutron port-create 
 * 2) neutron port-list - get the above created port id from the list
 * 3) nova interface-attach --port-id $PID 

Associate Floating ip to a specfic nic

-nova floating-ip-associate   to assign floating ip #nova floating-ip-associate --fixed-address 20.20.20.93 22b67b50-5f7a-4927-9dab-95407af17c8 192.168.12.56  --assign F.IP to 2nd NIC

How to set a TACACS+ or RADIUS servers http://infotechnotebook.blogspot.com/2015/06/install-and-configure-tacacsfreeradius.html

Horizon Dashboard 403 Forbidden Solution: unset http_proxy & unset https_proxy

Network troubleshooting in openstack http://docs.openstack.org/ops-guide/ops-network-troubleshooting.html ## imp ## systemctl restart neutron-openvswitch-agent.service neutron-l3-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service

Open vSwitch CLI Before goind any deeper with command line interface, you have to know that OVS does manage two kinds of flow: OpenFlows - User Space based Datapath - kernel based, a kind of cached version of the OpenFlow ones. So different commands will be used to interact with each of them: ovs-ofctl - speak to OpenFlow module ovs-dpctl - speak to Kernel module

ovs-vsctl provides a high level interface for Open vSwitch Database. It allow you to query and configure ovs−vswitchd and is more convenient than ovsdb-* tools that are lower             level commands. ovs-vsctl –V version of openvswitch ovs-vsctl show print a brief overview of database configuration ovs-vsctl list-br list of configured bridges ovs-vsctl list-ports list of ports on a specific bridge ovs-vsctl get-manager list of NVP Controllers (TCP 6632) ovs-vsctl get-controller list of NVP Controllers (TCP 6633) ovs-vsctl list manager list of NVP Controllers (TCP 6632) ovs-vsctl list controller list of NVP Controllers (TCP 6633) ovs-vsctl list interface list of interfaces

ovs-ofctl will allow you to monitor and administer OpenFlow switches. ovs-ofctl dump-flows Examine OpenFlow tables ovs-ofctl show port number to port name mapping ovs-ofctl dump-ports port statistics by port number

You can use watch like this watch "ovs-ofctl dump-flows br-tun" Note: read the man page of ovs-ofctl to better understand how to decode flow tables

ovs-appctl offer a way to send commands to a running Open vSwitch. ovs-appctl bridge/dumpflows examine flow tables, offers direct connectivity for VMs on the same hosts ovs-appctl fdb/show list mac/vlan pairs learned ovs-dpctl can show, create, modify, and delete Open vSwitch datapaths. ovs-dpctl dump-flows dump Datapath (kernel cached) flows

CLoud 2 Cloud migration of tenants, user, rules http://stackoverflow.com/questions/34470735/sharing-resources-between-two-independent-openstack-cloud-setups

Proxy issue proxy=http://x.x.x.x:xxxx" in /etc/yum.conf

Openstack Newton Image upload option in dashboard REST_API_REQUIRED_SETTINGS from the local_settings.py.example file: REST_API_REQUIRED_SETTINGS = ['OPENSTACK_HYPERVISOR_FEATURES', 'LAUNCH_INSTANCE_DEFAULTS', 'OPENSTACK_IMAGE_FORMATS'] https://ask.openstack.org/en/question/97794/the-current-horizon-settings-indicate-no-valid-image-creation-methods-are-available-providing-an-image-location-andor-uploading-from-the-local-file/

How to change horizon dashboard logo and login screen logo Go to /usr/share/openstack-dashboard/static/dashboard/img and replace the "logo-splash.png" & "logo.png" with your desired png files. Make sure you crop the images accordingly and rename your image names to above png files respectively.

REMOTE DESKTOP CONNECTION ON CENTOS 7 VNC xrdp installation on Centos 7 working --> http://www.itzgeek.com/how-tos/linux/centos-how-tos/install-xrdp-on-centos-7-rhel-7.html

openstack-status & keystone command not found openstack-status: yum install openstack-utils https://ask.openstack.org/en/question/98125/openstack-status-command-not-found/ If configured glance in swift In glance-api.conf default_store=swift stores=swift

SR-IOV configuration in Liberty https://wiki.openstack.org/wiki/SR-IOV-Passthrough-For-Networking-Liberty

Packstack MITAKA Installation on Centos 7 1 Fresh Install of OS, then run below commands after configuring the IP address make sure it reaches outside world 2 $systemctl stop NetworkManager.service 3 $systemctl disable NetworkManager.service 4 $systemctl restart network 5 $systemctl stop firewalld 6 $systemctl disable firewalld 7 $yum install centos-release-openstack-mitaka 8 $vi /etc/yum.conf 9 $yum install centos-release-openstack-mitaka 10 $yum update -y 11 $yum install openstack-packstack 12 $packstack --allinone 13 Bridging add br-ex port to eno1 Setup the Bridge interface Step1 : Copy the existing Ethernet adaptor configuration file # cp /etc/sysconfig/network-scripts/ifcfg-eno1 /root # cp /etc/sysconfig/network-scripts/ifcfg-eno1 /etc/sysconfig/network-scripts/ifcfg-br-ex Step2: Edit the eno1 adapter configuration file and remove and modify the file as looks below DEVICE=eno1 ONBOOT=yes TYPE=OVSPort DEVICETYPE=ovs OVS_BRIDGE=br-ex HWADDR="" # vi /etc/sysconfig/network-scripts/ifcfg-eno1 Do the changes as above and save the file Step3: Edit the br-ex adapter file and makes changes as below Assign your system ip address # vi /etc/sysconfig/network-scripts/ifcfg-br-ex DEVICE=br-ex BOOTPROTO=static ONBOOT=yes TYPE=OVSBridge DEVICETYPE=ovs USERCTL=yes PEERDNS=yes IPV6INIT=no IPADDR= NETMASK= GATEWAY= DNS1= Step4: Enable the bridge # ovs-vsctl add-port br-ex eth0 ; systemctl restart network.service