Friday, April 6, 2018

Openstack Pike TripleO on a KVM: KVM host preparations for having all the undercloud and the overcloud machines run as a VirtualMachine on the same


KVM Host few basic OS configruations.


These are the few of the basic configurations that have to be done on the KVM Host to make this ready to have the OpenStack Pike tripleo Undercloud and the overcloud installation 


Setting the hostname for the KVM Host.


Ensure that the hostname has been set using

hostnamectl set-hostname lab.example.com

Confirm the same using hostnamectl command, Also put an Entry of the IP address and the hostname in the /etc/hosts of the KVM Host.


Setting the Static IP on the KVM Host

Ensure that the IP address has been set for the KVM Host 

Set a static IP in the /etc/sysconfig/network-scripts/ifcfg-<DEVICE>


Setting the SELINUX to permissive/enforcing mode 


SELINUX can be allowed to be in enforcing mode here in /etc/selinux/config

In this file set SELINUX=enforcing 

Followed by running the 

setenforce 1
sestatus 

--

Disable the NetworkManager service and stop the same


systemctl stop NetworkManager 
systemctl disable NetworkManager 

Start and Enable the network service 

systemctl enable network 
systemctl start network 

--

Setting up system proxy and the /etc/yum.conf proxy for the KVM Host

As the KVM host is behind a proxy server, the needed proxy server was added to the KVM host /etc/profile and also to the /etc/yum.conf 


These lines has been added to the /etc/profile of the server 

export http_proxy=http://1.2.3.4:8080
export https_proxy=http://1.2.3.4:8080
export no_proxy=$(echo $(cat /etc/hosts| grep -v ^# | grep -v ^$ | awk '{print $1}' | tr "\n" ",")localhost,127.0.0.1,.sujitnet11.net,.netx.sujit.com)

Please note the above one helps the undercloud and the other hosts' VIPs /IPs to be kept in the /etc/hosts of the KVM host, so that the subsequent access to the openstack CLI /GUI works from the KVM Host.

The line that was added to the /etc/yum.conf had been 

export proxy=http://1.2.3.4:8080


Updating the CentOS 7 Operating System 


yum update -y && reboot

Reboot after the completion of the update 

Installation of the common utilities and the Libvirt RPMs 

As this is a minimal install of CentOS7, installing few handy utilities and the libvirtd 

yum -y install vim bash-completion net-tools bind-utils curl wget rsync  libvirt qemu-kvm libvirt-client virt-install virt-manager virt-top virt-viewer


Enable and start the libvirtd daemon 

systemctl enable libvirtd
systemctl start libvirtd


Go to the Main page of the OpenStack Tripleo on KVM : Openstack Pike TripleO undercloud deployment with overcloud controller HA on KVM (libvirt)

Common Openstack tripleo undercloud and overcloud deployment issues

If you come across these common errors during the exercise of the tripleo installations



If a node is in maintenance state to take this out of maintenance state perform the following. Please note that the baremetalServers in the maint state are skipped from provisioning.



openstack baremetal node maintenance unset <BaremetalServer>

--
If there is a node that has come to an error state as seen the baremetal list then the same can be cleaned and made available using 

openstack baremetal node undeploy overcloud-node2

--

If the overcloud deploy heat stack create fails and you have to re-run the deploy

If the overcloud heat stack creation fails, then you try seeing the problems on the screen and troubleshoot.

If you want to re-deploy, then delete the failed stack and re-run the openstack overcloud deploy.

As the stack user get the stack name for the overcloud deploy

openstack stack list 

Delete the stack


openstack stack delete <stack_name>

Run the overcloud deploy again

openstack overcloud deploy <OPTIONS>

--

Small things to check for a failed overcloud deploy you can try logging in to the openstack overcloud 


On the undercloud as the stack user first get the IP address of the overcloud deployed servers. 

SSH to the overcloud server (being logged in as stack user to the undercloud server) as heat-admin user. Once logged in to the overcloud server see stacks in /var/lib/heat-config


The above will look like


(undercloud) [stack@pike ~]$ openstack server list
+--------------------------------------+-------------------------+--------+------------------------+----------------+--------------+
| ID                                   | Name                    | Status | Networks               | Image          | Flavor       |
+--------------------------------------+-------------------------+--------+------------------------+----------------+--------------+
| ba22ab2c-9806-449b-9634-a1fa03633f99 | overcloud-novacompute-1 | ACTIVE | ctlplane=172.16.201.20 | overcloud-full | compute      |
| 29cd628e-dab0-4604-ae86-244532d8d4a8 | overcloud-controller-0  | ACTIVE | ctlplane=172.16.201.16 | overcloud-full | control      |
| 3099e7c7-f78e-40b7-985b-b6a386f6d610 | overcloud-cephstorage-2 | ACTIVE | ctlplane=172.16.201.14 | overcloud-full | ceph-storage |
| 74813a4e-a05e-46e1-b37d-9b282c710b21 | overcloud-controller-1  | ACTIVE | ctlplane=172.16.201.26 | overcloud-full | control      |
| 21bb7cff-9022-4a28-a6b9-c31e3152944d | overcloud-novacompute-0 | ACTIVE | ctlplane=172.16.201.15 | overcloud-full | compute      |
| 5050f803-13d5-4824-87bb-0a8bb51d467b | overcloud-cephstorage-0 | ACTIVE | ctlplane=172.16.201.13 | overcloud-full | ceph-storage |
| fade8e00-cc0f-4b58-b492-85c7bc3a39f7 | overcloud-cephstorage-1 | ACTIVE | ctlplane=172.16.201.23 | overcloud-full | ceph-storage |
+--------------------------------------+-------------------------+--------+------------------------+----------------+--------------+
(undercloud) [stack@pike ~]$
(undercloud) [stack@pike ~]$


(undercloud) [stack@pike ~]$ ssh heat-admin@172.16.201.14
The authenticity of host '172.16.201.14 (172.16.201.14)' can't be established.
ECDSA key fingerprint is SHA256:5AI/hMKyjTjPdn3Ffo/6up95zHK7V5xe104cssd+fSk.
ECDSA key fingerprint is MD5:f1:a9:b2:bf:00:d0:7c:38:b1:90:22:5e:cf:cb:26:da.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.16.201.14' (ECDSA) to the list of known hosts.
[heat-admin@overcloud-cephstorage-2 ~]$
[heat-admin@overcloud-cephstorage-2 ~]$
[heat-admin@overcloud-cephstorage-2 ~]$ sudo su -
Last login: Tue Apr  3 14:59:40 UTC 2018

[root@overcloud-cephstorage-2 heat-config]# ls -ltr /var/lib/heat-config
total 12
drwx------. 2 root root 4096 Apr  4 03:32 heat-config-script
drwx------. 2 root root 4096 Apr  4 03:48 heat-config-ansible
drwx------. 2 root root 4096 Apr  4 03:49 deployed
[root@overcloud-cephstorage-2 heat-config]#
[root@overcloud-cephstorage-2 heat-config]#
[root@overcloud-cephstorage-2 heat-config]#

Go to the Main page of the OpenStack Tripleo on KVM : Openstack Pike TripleO undercloud deployment with overcloud controller HA on KVM (libvirt)

OpenStack Pike TripleO OverCloud Deployment : pre-deployment validations and overcloud deploy



Run the pre-validations before the overcloud deploy 


If you want to run the pre-deploy validations manually, you can do so using


openstack workflow execution create tripleo.validations.v1.run_groups '{"group_names": ["pre-deployment"]}'



--

Please note that as we are going to have the overcloud deployment to have the 3 control nodes in HA, the --ntp-server must be given. Please note that you can also run the below with the --dry-run 

openstack overcloud deploy --libvirt-type qemu \

--control-flavor control --control-scale 2 \

--ceph-storage-flavor ceph-storage --ceph-storage-scale 3 \

--compute-flavor compute --compute-scale 1 \

--stack overcloud \

--ntp-server 50.22.155.163 \

--templates /usr/share/openstack-tripleo-heat-templates \

-e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml \

-e /usr/share/openstack-tripleo-heat-templates/environments/puppet-ceph.yaml \

-e /usr/share/openstack-tripleo-heat-templates/environments/network-environment.yaml \

-e /home/stack/tripleoenvironments/environment.yaml \

--roles-file /home/stack/tripleoenvironments/roles_data.yaml \

--no-proxy "127.0.0.1,::1,192.168.24.201,172.16.0.1,192.168.128.177,pike.sujitnet11.net,.sujitnet11.net" 

NOTE: there had been errors during the overcloud install related to the GNOCCHI and CEILOMETER components on the overcloud servers. Hence, for now to complete the installation I had excluded these services from the /usr/share/openstack-tripleo-heat-templates/roles_data.yaml.


--


OUTPUT TRUNCATED 

..
..
.
.

2018-04-03 15:34:46Z [overcloud.AllNodesDeploySteps.CephStoragePostConfig]: CREATE_COMPLETE  state changed
2018-04-03 15:34:46Z [overcloud.AllNodesDeploySteps.ObjectStoragePostConfig]: CREATE_COMPLETE  state changed
2018-04-03 15:34:46Z [overcloud.AllNodesDeploySteps.BlockStoragePostConfig]: CREATE_COMPLETE  state changed
2018-04-03 15:34:46Z [overcloud.AllNodesDeploySteps.ComputePostConfig]: CREATE_COMPLETE  state changed
2018-04-03 15:35:16Z [overcloud.AllNodesDeploySteps.ControllerPostConfig.ControllerPostPuppetMaintenanceModeDeployment]: CREATE_COMPLETE  state changed
2018-04-03 15:35:16Z [overcloud.AllNodesDeploySteps.ControllerPostConfig.ControllerPostPuppetRestart]: CREATE_IN_PROGRESS  state changed
2018-04-03 15:35:52Z [overcloud.AllNodesDeploySteps.ControllerPostConfig.ControllerPostPuppetRestart]: CREATE_COMPLETE  state changed
2018-04-03 15:35:52Z [overcloud.AllNodesDeploySteps.ControllerPostConfig]: CREATE_COMPLETE  Stack CREATE completed successfully
2018-04-03 15:35:52Z [overcloud.AllNodesDeploySteps.ControllerPostConfig]: CREATE_COMPLETE  state changed
2018-04-03 15:35:52Z [overcloud.AllNodesDeploySteps]: CREATE_COMPLETE  Stack CREATE completed successfully
2018-04-03 15:35:53Z [overcloud.AllNodesDeploySteps]: CREATE_COMPLETE  state changed
2018-04-03 15:35:53Z [overcloud]: CREATE_COMPLETE  Stack CREATE completed successfully

 Stack overcloud CREATE_COMPLETE

Host 172.16.201.21 not found in /home/stack/.ssh/known_hosts
Overcloud Endpoint: http://172.16.201.21:5000/v2.0
Overcloud Deployed
(undercloud) [stack@pike ~]$
(undercloud) [stack@pike ~]$


--


Basic confirmations that the overcloud has been deployed 



(undercloud) [stack@pike ~]$ openstack baremetal node list
+--------------------------------------+-----------------+--------------------------------------+-------------+--------------------+-------------+
| UUID                                 | Name            | Instance UUID                        | Power State | Provisioning State | Maintenance |
+--------------------------------------+-----------------+--------------------------------------+-------------+--------------------+-------------+
| ee2484bb-02a9-4380-9e87-39aeba537b77 | overcloud-node1 | 29cd628e-dab0-4604-ae86-244532d8d4a8 | power on    | active             | False       |
| 6b1cc13d-6da2-487a-92ba-744881acace1 | overcloud-node2 | 74813a4e-a05e-46e1-b37d-9b282c710b21 | power on    | active             | False       |
| fee38738-60ba-4db4-a84e-158ff3c65a4b | overcloud-node3 | None                                 | power off   | available          | False       |
| 64a367fe-03db-4780-a3b9-352665fd95d7 | overcloud-node4 | None                                 | power off   | available          | False       |
| 5e734b8a-3b21-43f9-841f-60f1cb3c4af1 | overcloud-node5 | None                                 | power off   | available          | False       |
| d2d31668-060b-4642-8c5c-298ddebbf4c1 | overcloud-node6 | 21bb7cff-9022-4a28-a6b9-c31e3152944d | power on    | active             | False       |
| fbd40010-c851-4df4-93a9-5f39c5c0921a | overcloud-node7 | 3099e7c7-f78e-40b7-985b-b6a386f6d610 | power on    | active             | False       |
| 303a53b2-79ca-40b8-b0a1-49a0cabfc14f | overcloud-node8 | 5050f803-13d5-4824-87bb-0a8bb51d467b | power on    | active             | False       |
| c3c63a3b-c596-48c9-bfd8-e3c7115a226d | overcloud-node9 | fade8e00-cc0f-4b58-b492-85c7bc3a39f7 | power on    | active             | False       |
+--------------------------------------+-----------------+--------------------------------------+-------------+--------------------+-------------+
(undercloud) [stack@pike ~]$



As the overcloud is in progress the baremetal servers get an instance ID and the state changes to deploying 

(undercloud) [stack@pike ~]$ openstack server list
+--------------------------------------+-------------------------+--------+------------------------+----------------+--------------+
| ID                                   | Name                    | Status | Networks               | Image          | Flavor       |
+--------------------------------------+-------------------------+--------+------------------------+----------------+--------------+
| 29cd628e-dab0-4604-ae86-244532d8d4a8 | overcloud-controller-0  | ACTIVE | ctlplane=172.16.201.16 | overcloud-full | control      |
| 3099e7c7-f78e-40b7-985b-b6a386f6d610 | overcloud-cephstorage-2 | ACTIVE | ctlplane=172.16.201.14 | overcloud-full | ceph-storage |
| 74813a4e-a05e-46e1-b37d-9b282c710b21 | overcloud-controller-1  | ACTIVE | ctlplane=172.16.201.26 | overcloud-full | control      |
| 21bb7cff-9022-4a28-a6b9-c31e3152944d | overcloud-novacompute-0 | ACTIVE | ctlplane=172.16.201.15 | overcloud-full | compute      |
| 5050f803-13d5-4824-87bb-0a8bb51d467b | overcloud-cephstorage-0 | ACTIVE | ctlplane=172.16.201.13 | overcloud-full | ceph-storage |
| fade8e00-cc0f-4b58-b492-85c7bc3a39f7 | overcloud-cephstorage-1 | ACTIVE | ctlplane=172.16.201.23 | overcloud-full | ceph-storage |
+--------------------------------------+-------------------------+--------+------------------------+----------------+--------------+
(undercloud) [stack@pike ~]$


Please note that the overcloud deploy creates 2 user environment profile files 'overcloudrc' and 'overcloudrc.v3' that can be sourced to connect to and run the openstack commands on the overcloud.



Go to the Main page of the OpenStack Tripleo on KVM : Openstack Pike TripleO undercloud deployment with overcloud controller HA on KVM (libvirt)

OpenStack Pike TripleO undercloud overcloud: Final preparations before deploying the overcloud



Ensure the profile has been set in the capabilities of the nodes.

Check one of the nodes details to see the capabilities now show the associated profile.


(undercloud) [stack@pike ~]$
(undercloud) [stack@pike ~]$ openstack baremetal node show d2d31668-060b-4642-8c5c-298ddebbf4c1

--


Creating the environment file to pass the variables to build the overcloud

Putting the env vars to be used for the openstack overcloud deploy in a single file. These are the parameter variable to be passed to the overcloud deploy.

parameter_defaults:
  ControlPlaneDefaultRoute: '172.16.0.1'
  DnsServers: '172.16.0.1'
  OvercloudCephStorageFlavor: ceph-storage
  CephStorageCount: 3
  CephDefaultPoolSize: 3
  ControllerCount: 3

  ExtraConfig:
    ceph::profile::params::osds:
      '/dev/sdb':
        journal: '/dev/sdc'

        

  • Please note that the above is self-explanatory as we are specfiying that the controller count will be 3 and the same will be the count of the ceph-storage servers.
  • Also by the 'ExtraConfig' we specidy that the ceph will use /dev/sdb and /dev/sdc on the ceph overcloud nodes where /dev/sdc on them will be used for Ceph Journal.
  • (Please note that at the time of the creation of the overcloud VirtuaMachines on the KVM host we had specified 3 * 60GB disks for the ceph-nodes.)

--

    
Deciding on selecting which environment files will be used to deploy the overcloud
  
The overcloud installation is highly customizable. The list here cannot be exhaustive, hence it is suggested that you go through the openstack tripleo guides on the OpenStack documentation website.



For HA of the overcloud controllers as we are going to have 3 Controller in the overcloud and they will be in Highly Available configuration we will use the puppet-pacemaker.yaml HEAT environment template YAML file 

-e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml --ntp-server pool.ntp.org

An NTP server is must when you are installing CEPH as well as the PACEMAKER based OpenStack Controller HA 

As we are also going to install ceph on the ceph-storage nodes, we are going to use the puppet-ceph.yaml HEAT template YAML file 

-e /usr/share/openstack-tripleo-heat-templates/environments/puppet-ceph.yaml

--

--

Considerations for the overcloud nodes being behind a proxy server

As the overcloud servers are going to be behind a proxy, so the proxy parameters have to be set to the overcloud nodes as the part of the firstboot. 

Please note that this was a workaround, and may not be needed in your case.

It is however important to note that the /usr/share/openstack-tripleo-heat-templates/firstboot/userdata_default.yaml is a good place to run the firstboot customization for all common things on all the overcloud servers.


Also my lookout was to have the default gateway at the OS level set also for the overcloud controllers. The default gateway at the OS of the overcloud compute nodes was getting set correctly automatically.



Edit the file /usr/share/openstack-tripleo-heat-templates/firstboot/userdata_default.yaml 


heat_template_version: pike

description: >
  This is a default no-op template which provides empty user-data
  which can be passed to the OS::Nova::Server resources.
  This template can be replaced with a different implementation via
  the resource registry, such that deployers may customize their
  first-boot configuration.

resources:
  userdata:
    type: OS::Heat::MultipartMime
    properties:
      parts:
        - config: { get_resource: proxy_config }

  proxy_config:
    type: OS::Heat::SoftwareConfig
    properties:
      group: ungrouped
      config: |
        #!/bin/bash
        echo "Running boot script"
        sudo su -c  "echo 'export http_proxy=http://1.2.3.4:8080' >> /etc/profile"
        sudo su -c  "echo 'export https_proxy=http://1.2.3.4:8080' >> /etc/profile"
        sudo su -c  "echo 'proxy=http://1.2.3.4:8080' >> /etc/yum.conf
        if [ $( ip r s | grep -i default | wc -l) -eq 0 ]; then
        /usr/sbin/route add default gw 172.16.0.1 dev br-ex
        echo "default via 172.16.0.1 dev br-ex" >> /etc/sysconfig/network-scripts/route-br-ex
        fi

outputs:
  # This means get_resource from the parent template will get the userdata, see:
  # http://docs.openstack.org/developer/heat/template_guide/composition.html#making-your-template-resource-more-transparent
  # Note this is new-for-kilo, an alternative is returning a value then using
  # get_attr in the parent template instead.
  OS::stack_id:
    value: {get_resource: userdata}



These are the environment files that we are going to use in our OpenStack PIKE overcloud TripleO deployment.



Go to the Main page of the OpenStack Tripleo on KVM : Openstack Pike TripleO undercloud deployment with overcloud controller HA on KVM (libvirt)

OpenStack Pike TripleO Overcloud Preparations: Match overcloud baremetals to the correct profiles and perform introspection of the baremetal nodes



Association of the baremetal servers to the profiles 



The Baremetal nodes that had been imported, if have not been attached to any profiles, the below command will not give any outputs.

Matching of the servers to the capabilities profile(s) is needed so that the corresponding flavor association is known to the undercloud, when the undercloud is about to deploy the overcloud on these baremetal servers.


[stack@osa ~]$ openstack overcloud profiles list


Associate the baremetal servers to the profiles. 


Here the first three nodes overcloud-node{1..3} are added to the control profile, overcloud-node{4..6} to the compute profile and overcloud-node{7..9} to the ceph-storage profile.

3 baremetals for the control flavors 

openstack baremetal node set --property capabilities='cpu_aes:true,cpu_hugepages:true,boot_option:local,cpu_vt:true,cpu_hugepages_1g:true,boot_mode:bios,profile:control' overcloud-node1

openstack baremetal node set --property capabilities='cpu_aes:true,cpu_hugepages:true,boot_option:local,cpu_vt:true,cpu_hugepages_1g:true,boot_mode:bios,profile:control' overcloud-node2

openstack baremetal node set --property capabilities='cpu_aes:true,cpu_hugepages:true,boot_option:local,cpu_vt:true,cpu_hugepages_1g:true,boot_mode:bios,profile:control' overcloud-node3

3 baremetals for the compute flavor

openstack baremetal node set --property capabilities='cpu_aes:true,cpu_hugepages:true,boot_option:local,cpu_vt:true,cpu_hugepages_1g:true,boot_mode:bios,profile:compute' overcloud-node4

openstack baremetal node set --property capabilities='cpu_aes:true,cpu_hugepages:true,boot_option:local,cpu_vt:true,cpu_hugepages_1g:true,boot_mode:bios,profile:compute'  overcloud-node5

openstack baremetal node set --property capabilities='cpu_aes:true,cpu_hugepages:true,boot_option:local,cpu_vt:true,cpu_hugepages_1g:true,boot_mode:bios,profile:compute' overcloud-node6


3 baremetals for the ceph-storage flavor

openstack baremetal node set --property capabilities='cpu_aes:true,cpu_hugepages:true,boot_option:local,cpu_vt:true,cpu_hugepages_1g:true,boot_mode:bios,profile:ceph-storage'  overcloud-node7

openstack baremetal node set --property capabilities='cpu_aes:true,cpu_hugepages:true,boot_option:local,cpu_vt:true,cpu_hugepages_1g:true,boot_mode:bios,profile:ceph-storage' overcloud-node8

openstack baremetal node set --property capabilities='cpu_aes:true,cpu_hugepages:true,boot_option:local,cpu_vt:true,cpu_hugepages_1g:true,boot_mode:bios,profile:ceph-storage' overcloud-node9

--


Start the introspection of the baremetal nodes 


The nodes have to  be in manageable state to allow the undercloud to run introspection on them 


After the nodes are added to the profiles, start the introspection on the nodes.

(undercloud) [stack@pike ~]$ openstack overcloud node introspect --all-manageable
Waiting for introspection to finish...
Started Mistral Workflow tripleo.baremetal.v1.introspect_manageable_nodes. Execution ID: cb7a5597-20f2-4fee-acd2-c5d7c7f4c7f5
Waiting for messages on queue 'c58bd637-4366-4218-bca6-f544591ad515' with no timeout.
Introspection of node ee2484bb-02a9-4380-9e87-39aeba537b77 completed. Status:SUCCESS. Errors:None
Introspection of node 6b1cc13d-6da2-487a-92ba-744881acace1 completed. Status:SUCCESS. Errors:None
Introspection of node fee38738-60ba-4db4-a84e-158ff3c65a4b completed. Status:SUCCESS. Errors:None
Introspection of node d2d31668-060b-4642-8c5c-298ddebbf4c1 completed. Status:SUCCESS. Errors:None
Introspection of node 5e734b8a-3b21-43f9-841f-60f1cb3c4af1 completed. Status:SUCCESS. Errors:None
Introspection of node fbd40010-c851-4df4-93a9-5f39c5c0921a completed. Status:SUCCESS. Errors:None
Introspection of node 64a367fe-03db-4780-a3b9-352665fd95d7 completed. Status:SUCCESS. Errors:None
Introspection of node c3c63a3b-c596-48c9-bfd8-e3c7115a226d completed. Status:SUCCESS. Errors:None
Introspection of node 303a53b2-79ca-40b8-b0a1-49a0cabfc14f completed. Status:SUCCESS. Errors:None
Successfully introspected nodes.
Nodes introspected successfully.
Introspection completed.
(undercloud) [stack@pike ~]$

--

Alternate way to confirm that the overcloud node introspection has completed and there has been no errors 

on the undercloud server run 

openstack baremetal introspection bulk status 

(undercloud) [stack@pike ~]$ openstack baremetal introspection bulk status
+--------------------------------------+----------+-------+
| Node UUID                            | Finished | Error |
+--------------------------------------+----------+-------+
| ee2484bb-02a9-4380-9e87-39aeba537b77 | True     | None  |
| 6b1cc13d-6da2-487a-92ba-744881acace1 | True     | None  |
| fee38738-60ba-4db4-a84e-158ff3c65a4b | True     | None  |
| d2d31668-060b-4642-8c5c-298ddebbf4c1 | True     | None  |
| fbd40010-c851-4df4-93a9-5f39c5c0921a | True     | None  |
| 303a53b2-79ca-40b8-b0a1-49a0cabfc14f | True     | None  |
| c3c63a3b-c596-48c9-bfd8-e3c7115a226d | True     | None  |
| 47283771-3751-4a2f-a8f9-fa631a4baaf2 | True     | None  |
| 38c01c94-c301-4b39-ab88-b1c12dcf67a6 | True     | None  |
+--------------------------------------+----------+-------+
(undercloud) [stack@pike ~]$




Set the introspected baremetal servers to the 'available' state for provisioning 



Enable the servers to be in the available state of provisioning using 

openstack baremetal node provide <baremetalServer>

or 

openstack overcloud node provide --all-manageable


(undercloud) [stack@pike ~]$ openstack overcloud node provide --all-manageable
Started Mistral Workflow tripleo.baremetal.v1.provide_manageable_nodes. Execution ID: 46b2e88b-b695-4234-b49a-e7d30d696a08
Waiting for messages on queue '72247e95-c174-456b-a04e-8afbef2aaf97' with no timeout.

Successfully set nodes state to available.


(undercloud) [stack@pike ~]$

--
Ensure that the baremetal servers are in available state for provisioning
openstack baremetal node list

(undercloud) [stack@pike ~]$ openstack baremetal node list
+--------------------------------------+-----------------+---------------+-------------+--------------------+-------------+
| UUID                                 | Name            | Instance UUID | Power State | Provisioning State | Maintenance |
+--------------------------------------+-----------------+---------------+-------------+--------------------+-------------+
| ee2484bb-02a9-4380-9e87-39aeba537b77 | overcloud-node1 | None          | power off   | available          | False       |
| 6b1cc13d-6da2-487a-92ba-744881acace1 | overcloud-node2 | None          | power off   | available          | False       |
| fee38738-60ba-4db4-a84e-158ff3c65a4b | overcloud-node3 | None          | power off   | available          | False       |
| 64a367fe-03db-4780-a3b9-352665fd95d7 | overcloud-node4 | None          | power off   | available          | False       |
| 5e734b8a-3b21-43f9-841f-60f1cb3c4af1 | overcloud-node5 | None          | power off   | available          | False       |
| d2d31668-060b-4642-8c5c-298ddebbf4c1 | overcloud-node6 | None          | power off   | available          | False       |
| fbd40010-c851-4df4-93a9-5f39c5c0921a | overcloud-node7 | None          | power off   | available          | False       |
| 303a53b2-79ca-40b8-b0a1-49a0cabfc14f | overcloud-node8 | None          | power off   | available          | False       |
| c3c63a3b-c596-48c9-bfd8-e3c7115a226d | overcloud-node9 | None          | power off   | available          | False       |
+--------------------------------------+-----------------+---------------+-------------+--------------------+-------------+
(undercloud) [stack@pike ~]$

--

Ensure the servers are matching to the correct overcloud profiles 

After the baremetal servers are set to available mode using the openstack overcloud node provide --all-mangeable, the profile associations show up.


(undercloud) [stack@pike ~]$ openstack overcloud profiles list
+--------------------------------------+-----------------+-----------------+-----------------+-------------------+
| Node UUID                            | Node Name       | Provision State | Current Profile | Possible Profiles |
+--------------------------------------+-----------------+-----------------+-----------------+-------------------+
| ee2484bb-02a9-4380-9e87-39aeba537b77 | overcloud-node1 | active          | control         |                   |
| 6b1cc13d-6da2-487a-92ba-744881acace1 | overcloud-node2 | active          | control         |                   |
| fee38738-60ba-4db4-a84e-158ff3c65a4b | overcloud-node3 | available       | control         |                   |
| 64a367fe-03db-4780-a3b9-352665fd95d7 | overcloud-node4 | available       | compute         |                   |
| 5e734b8a-3b21-43f9-841f-60f1cb3c4af1 | overcloud-node5 | available       | compute         |                   |
| d2d31668-060b-4642-8c5c-298ddebbf4c1 | overcloud-node6 | active          | compute         |                   |
| fbd40010-c851-4df4-93a9-5f39c5c0921a | overcloud-node7 | active          | ceph-storage    |                   |
| 303a53b2-79ca-40b8-b0a1-49a0cabfc14f | overcloud-node8 | active          | ceph-storage    |                   |
| c3c63a3b-c596-48c9-bfd8-e3c7115a226d | overcloud-node9 | active          | ceph-storage    |                   |
+--------------------------------------+-----------------+-----------------+-----------------+-------------------+
(undercloud) [stack@pike ~]$

Tuning the Openstack flavors on the undercloud node to match the overcloud server hardware specifications: OpenStack Pike TripleO overcloud and undercloud




Tuning the existing flavors that had been created during the undercloud install. 



This is needed as the default flavors created have 1 vcpu, 4 GB RAM and 40 GB Disk information. And the Virtual machines on which the overcloud is going to be deployed are having 2 CPUs, 16GB RAM and 59 GB Virtual Disks. 



current flavors are as

(undercloud) [stack@pike ~]$ openstack flavor list
+--------------------------------------+---------------+------+------+-----------+-------+-----------+
| ID                                   | Name          |  RAM | Disk | Ephemeral | VCPUs | Is Public |
+--------------------------------------+---------------+------+------+-----------+-------+-----------+
| 649f2381-16a9-4e8c-8837-c81884599688 | baremetal     | 4096 |   40 |         0 |     1 | True      |
| 68566bf8-d567-4eaa-baf8-fd0b8d99507f | compute       | 4096 |   40 |         0 |     1 | True      |
| 6ddc254e-cdb1-47af-9b59-0a4e324d0cab | block-storage | 4096 |   40 |         0 |     1 | True      |
| 77b5ac55-c1ba-41d0-9130-0eb9e02277df | ceph-storage  | 4096 |   40 |         0 |     1 | True      |
| ecf47b65-8775-4e1b-840a-f3d4582074ec | swift-storage | 4096 |   40 |         0 |     1 | True      |
| f277a155-a535-45bc-b1e0-79b842ad10c6 | control       | 4096 |   40 |         0 |     1 | True      |
+--------------------------------------+---------------+------+------+-----------+-------+-----------+
(undercloud) [stack@pike ~]$

This is how the current flavors look like 

(undercloud) [stack@pike ~]$ openstack flavor show control
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field                      | Value                                                                                                                                                                |
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| OS-FLV-DISABLED:disabled   | False                                                                                                                                                                |
| OS-FLV-EXT-DATA:ephemeral  | 0                                                                                                                                                                    |
| access_project_ids         | None                                                                                                                                                                 |
| disk                       | 40                                                                                                                                                                   |
| id                         | f277a155-a535-45bc-b1e0-79b842ad10c6                                                                                                                                 |
| name                       | control                                                                                                                                                              |
| os-flavor-access:is_public | True                                                                                                                                                                 |
| properties                 | capabilities:boot_option='local', capabilities:profile='control', resources:CUSTOM_BAREMETAL='1', resources:DISK_GB='0', resources:MEMORY_MB='0', resources:VCPU='0' |
| ram                        | 4096                                                                                                                                                                 |
| rxtx_factor                | 1.0                                                                                                                                                                  |
| swap                       |                                                                                                                                                                      |
| vcpus                      | 1                                                                                                                                                                    |
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+





(undercloud) [stack@pike ~]$ openstack flavor show control
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field                      | Value                                                                                                                                                                |
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| OS-FLV-DISABLED:disabled   | False                                                                                                                                                                |
| OS-FLV-EXT-DATA:ephemeral  | 0                                                                                                                                                                    |
| access_project_ids         | None                                                                                                                                                                 |
| disk                       | 40                                                                                                                                                                   |
| id                         | f277a155-a535-45bc-b1e0-79b842ad10c6                                                                                                                                 |
| name                       | control                                                                                                                                                              |
| os-flavor-access:is_public | True                                                                                                                                                                 |
| properties                 | capabilities:boot_option='local', capabilities:profile='control', resources:CUSTOM_BAREMETAL='1', resources:DISK_GB='0', resources:MEMORY_MB='0', resources:VCPU='0' |
| ram                        | 4096                                                                                                                                                                 |
| rxtx_factor                | 1.0                                                                                                                                                                  |
| swap                       |                                                                                                                                                                      |
| vcpus                      | 1                                                                                                                                                                    |
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+





(undercloud) [stack@pike ~]$ openstack flavor show ceph-storage
+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field                      | Value                                                                                                                                                                     |
+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| OS-FLV-DISABLED:disabled   | False                                                                                                                                                                     |
| OS-FLV-EXT-DATA:ephemeral  | 0                                                                                                                                                                         |
| access_project_ids         | None                                                                                                                                                                      |
| disk                       | 40                                                                                                                                                                        |
| id                         | 77b5ac55-c1ba-41d0-9130-0eb9e02277df                                                                                                                                      |
| name                       | ceph-storage                                                                                                                                                              |
| os-flavor-access:is_public | True                                                                                                                                                                      |
| properties                 | capabilities:boot_option='local', capabilities:profile='ceph-storage', resources:CUSTOM_BAREMETAL='1', resources:DISK_GB='0', resources:MEMORY_MB='0', resources:VCPU='0' |
| ram                        | 4096                                                                                                                                                                      |
| rxtx_factor                | 1.0                                                                                                                                                                       |
| swap                       |                                                                                                                                                                           |
| vcpus                      | 1                                                                                                                                                                         |
+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
(undercloud) [stack@pike ~]$


--

Adjusting the flavors on the undercloud to match the configuration of the overcloud nodes.

Tune the flavors in case the servers are different as compared to the existing flavors.


Here we delete the existing flavors and then re-create them with the values of vcpus, ram and disk to match the configuration of our virtual machines created for the overcloud.

openstack flavor delete <FlavorID>

openstack flavor create --vcpus <VirtualCPUCounts> --ram <RAMinMB> --disk <DiskSizeGB> <FlavorName>


Deletion of the existing flavors 

openstack flavor delete control 
openstack flavor delete compute
openstack flavor delete ceph-storage

Create the flavor again with the values suitable for the baremetal servers and as per your plan to use them 


openstack flavor create --id auto --ram 16384 --disk 59 --vcpus 2 control
openstack flavor create --id auto --ram 16384 --disk 59 --vcpus 2 compute
openstack flavor create --id auto --ram 16384 --disk 59 --vcpus 2 ceph-storage

--

Ensure that the flavors are created.


[stack@osa ~]$ openstack flavor list
+--------------------------------------+---------------+-------+------+-----------+-------+-----------+
| ID                                   | Name          |   RAM | Disk | Ephemeral | VCPUs | Is Public |
+--------------------------------------+---------------+-------+------+-----------+-------+-----------+
| 3294e891-bfb4-42aa-80a1-d3593e442977 | compute       | 16384 |   59 |         0 |     2 | True      |
| 59f0eee6-4298-467d-8298-ff89e659e129 | block-storage |  4096 |   40 |         0 |     1 | True      |
| 7a6a1b46-1258-4289-a555-79e853473a21 | ceph-storage  | 16384 |   59 |         0 |     2 | True      |
| 7c9937fe-402e-46b2-be60-681ef67a40fe | swift-storage |  4096 |   40 |         0 |     1 | True      |
| 81c79d3d-3752-4778-a396-0ec81192fe2b | baremetal     |  4096 |   40 |         0 |     1 | True      |
| d7d86f60-d05a-42ed-b758-6687d9005a6d | control       | 16384 |   59 |         0 |     2 | True      |
+--------------------------------------+---------------+-------+------+-----------+-------+-----------+
[stack@osa ~]$

--

Match the flavors to the profiles

Openstack flavor matching to the profile. 
  • Here try to keep the profile name same as the flavor name. 
  • The profiles are set as the capabilities property of the flavor. 
  • Please note that later here we are mentioning the profile names for the servers also. 
  • This helps the undercloud match the servers to the profiles and hence to the flavors the nodes belong to.



openstack flavor set --property "cpu_arch"="x86_64" --property "capabilities:boot_option"="local" --property "capabilities:profile"="control" --property "resources:CUSTOM_BAREMETAL=1" --property "resources:DISK_GB=0" --property "resources:MEMORY_MB=0" --property "resources:VCPU=0" control

openstack flavor set --property "cpu_arch"="x86_64" --property "capabilities:boot_option"="local" --property "capabilities:profile"="compute" --property "resources:CUSTOM_BAREMETAL=1" --property "resources:DISK_GB=0" --property "resources:MEMORY_MB=0" --property "resources:VCPU=0" compute

openstack flavor set --property "cpu_arch"="x86_64" --property "capabilities:boot_option"="local" --property "capabilities:profile"="ceph-storage" --property "resources:CUSTOM_BAREMETAL=1" --property "resources:DISK_GB=0" --property "resources:MEMORY_MB=0" --property "resources:VCPU=0" ceph-storage



You can see here that the boot_option capability has been set to local to all the flavors also the flavors are matched to the corresponding profiles, like control flavor to control profile and so on.


Go to the Main page of the OpenStack Tripleo on KVM : Openstack Pike TripleO undercloud deployment with overcloud controller HA on KVM (libvirt)


pip3 install ovirt-engine-sdk-python 4.4.1 - import ovirtsdk4 errors with pycurl link-time SSL backend was nss and not openssl

In [2]: import ovirtsdk4 --------------------------------------------------------------------------- ImportError                         ...