Ask Your Question

BiG_NoBoDy's profile - activity

2019-03-08 07:26:58 -0500 answered a question MariaDB (MySQL) cleanup of nova database

recreated constraints with cascade on delete and works like a charm, but it toooook ages to apply some, so have downtime window (for horizon/api) Instances were running fine, which were already created.

2019-03-08 07:10:35 -0500 received badge  Notable Question (source)
2019-03-08 07:10:35 -0500 received badge  Popular Question (source)
2019-02-27 10:53:59 -0500 asked a question MariaDB (MySQL) cleanup of nova database

Hi,

I am trying to do cleanup on Newton (RHOSP 10) release nova DB, and want to remove old instances, which are removed LONG time ago (have about 7M rows on some tables).

I did some info gathering and found:

MariaDB [nova]> select TABLE_SCHEMA,TABLE_NAME,table_rows,AUTO_INCREMENT,TABLE_COMMENT from information_schema.tables where table_schema = 'nova' and table_rows >= 1000;
+--------------+--------------------------------+------------+----------------+---------------+
| TABLE_SCHEMA | TABLE_NAME                     | table_rows | AUTO_INCREMENT | TABLE_COMMENT |
+--------------+--------------------------------+------------+----------------+---------------+
| nova         | block_device_mapping           |    1021919 |        3644687 |               |
| nova         | instance_actions               |    2637028 |        7906316 |               |
| nova         | instance_actions_events        |     523519 |        8849807 |               |
| nova         | instance_extra                 |    1367875 |        3486497 |               |
| nova         | instance_faults                |       6079 |          14042 |               |
| nova         | instance_id_mappings           |    1162779 |        3486305 |               |
| nova         | instance_info_caches           |    1182036 |        3512678 |               |
| nova         | instance_metadata              |      62785 |         192781 |               |
| nova         | instance_system_metadata       |    7700511 |       20926265 |               |
| nova         | instances                      |    1192711 |        3486311 |               |
| nova         | reservations                   |    7059421 |       20933180 |               |
| nova         | s3_images                      |     160869 |         482213 |               |
| nova         | shadow_instance_actions_events |    2367811 |        7135407 |               |
| nova         | task_log                       |     103302 |         307409 |               |
| nova         | virtual_interfaces             |    3732556 |       10949276 |               |
+--------------+--------------------------------+------------+----------------+---------------+
15 rows in set (0.25 sec)

MariaDB [nova]> SELECT `TABLE_SCHEMA`, `TABLE_NAME`, `COLUMN_NAME`, `REFERENCED_TABLE_SCHEMA`, `REFERENCED_TABLE_NAME`, `REFERENCED_COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` WHERE `TABLE_SCHEMA` = SCHEMA()  AND `REFERENCED_TABLE_NAME` IS NOT NULL ORDER BY `REFERENCED_TABLE_NAME` ASC;
+--------------+-------------------------------------+-------------------+-------------------------+-----------------------+------------------------+
| TABLE_SCHEMA | TABLE_NAME                          | COLUMN_NAME       | REFERENCED_TABLE_SCHEMA | REFERENCED_TABLE_NAME | REFERENCED_COLUMN_NAME |
+--------------+-------------------------------------+-------------------+-------------------------+-----------------------+------------------------+
| nova         | aggregate_metadata                  | aggregate_id      | nova                    | aggregates            | id                     |
| nova         | aggregate_hosts                     | aggregate_id      | nova                    | aggregates            | id                     |
| nova         | pci_devices                         | compute_node_id   | nova                    | compute_nodes         | id                     |
| nova         | consoles                            | pool_id           | nova                    | console_pools         | id                     |
| nova         | instance_extra                      | instance_uuid     | nova                    | instances             | uuid                   |
| nova         | instance_system_metadata            | instance_uuid     | nova                    | instances             | uuid                   |
| nova         | virtual_interfaces                  | instance_uuid     | nova                    | instances             | uuid                   |
| nova         | consoles                            | instance_uuid     | nova                    | instances             | uuid                   |
| nova         | instance_faults                     | instance_uuid     | nova                    | instances             | uuid                   |
| nova         | instance_actions                    | instance_uuid     | nova                    | instances             | uuid                   |
| nova         | block_device_mapping                | instance_uuid     | nova                    | instances             | uuid                   |
| nova         | instance_info_caches                | instance_uuid     | nova                    | instances             | uuid                   |
| nova         | migrations                          | instance_uuid     | nova                    | instances             | uuid                   |
| nova         | instance_metadata                   | instance_uuid     | nova                    | instances             | uuid                   |
| nova         | security_group_instance_association | instance_uuid     | nova                    | instances             | uuid                   |
| nova         | fixed_ips                           | instance_uuid     | nova                    | instances             | uuid                   |
| nova         | instance_actions_events             | action_id         | nova                    | instance_actions      | id                     |
| nova         | instance_group_member               | group_id          | nova                    | instance_groups       | id                     |
| nova         | instance_group_policy               | group_id          | nova                    | instance_groups       | id                     |
| nova         | instance_type_projects              | instance_type_id  | nova                    | instance_types        | id                     |
| nova         | instance_type_extra_specs           | instance_type_id  | nova                    | instance_types        | id                     |
| nova         | reservations                        | usage_id          | nova                    | quota_usages          | id                     |
| nova         | security_group_rules                | parent_group_id   | nova                    | security_groups       | id                     |
| nova         | security_group_rules                | group_id          | nova                    | security_groups       | id                     |
| nova         | security_group_instance_association | security_group_id | nova                    | security_groups       | id                     |
+--------------+-------------------------------------+-------------------+-------------------------+-----------------------+------------------------+
25 rows in set (0.14 sec)

I compiled some delete line, but it gives me an error:

MariaDB [nova]> DELETE instances,instance_extra,instance_system_metadata,
virtual_interfaces,consoles,instance_faults,instance_actions,block_device_mapping,
instance_info_caches,migrations,instance_metadata,security_group_instance_association,
fixed_ips,instance_actions_events
FROM instances
JOIN instance_extra.instance_uuid = instances.uuid
JOIN instance_system_metadata.instance_uuid = instances.uuid
JOIN virtual_interfaces.instance_uuid = instances.uuid
JOIN consoles.instance_uuid = instances.uuid
JOIN instance_faults.instance_uuid = instances.uuid
JOIN instance_actions.instance_uuid = instances.uuid
JOIN block_device_mapping.instance_uuid = instances.uuid
JOIN instance_info_caches.instance_uuid = instances.uuid
JOIN migrations.instance_uuid = instances.uuid
JOIN instance_metadata.instance_uuid = instances.uuid
JOIN security_group_instance_association.instance_uuid = instances.uuid
JOIN fixed_ips.instance_uuid = instances.uuid
JOIN instance_actions_events.action_id = instance_actions.id
WHERE nova.instances.uuid = "d918a3b2-0a4b-4c73-9d06-ab58e458a648";
ERROR 1066 (42000): Not unique table/alias: 'instances'

--- update --- I have tried to add DB and get DN, table and column in apostrofas, but still getting error.

MariaDB [nova]> DELETE `nova`.`instances`,`nova`.`instance_extra`,`nova`.`instance_system_metadata`,`nova`.`virtual_interfaces`,`nova`.`consoles`,
    -> `nova`.`instance_faults`,`nova`.`instance_actions`,`nova`.`block_device_mapping`,`nova`.`instance_info_caches`,`nova`.`migrations`,
    -> `nova`.`instance_metadata`,`nova`.`security_group_instance_association`,`nova`.`fixed_ips`,`nova`.`instance_actions_events`
    -> FROM `nova`.`instances`
    -> JOIN `nova`.`instance_extra`.`instance_uuid` = `nova`.`instances`.`uuid`
    -> JOIN `nova`.`instance_system_metadata`.`instance_uuid` = `nova`.`instances`.`uuid`
    -> JOIN `nova`.`virtual_interfaces`.`instance_uuid` = `nova`.`instances`.`uuid`
    -> JOIN `nova ...
(more)
2019-02-22 08:28:50 -0500 commented answer How to move a instance between projects?

also do not forget networking part, you can share network with: neutron help | grep rbac

2019-02-21 09:26:56 -0500 commented answer nova never delete records in mysql

nova-manage db archive_deleted_rows --max_rows 1143146 --verbose but it do not work for me in Mitaka

2019-01-24 06:32:31 -0500 received badge  Supporter (source)
2019-01-24 04:30:33 -0500 received badge  Famous Question (source)
2019-01-17 10:12:45 -0500 received badge  Notable Question (source)
2019-01-17 10:12:45 -0500 received badge  Popular Question (source)
2019-01-15 04:37:01 -0500 received badge  Famous Question (source)
2019-01-09 02:10:19 -0500 received badge  Enthusiast
2019-01-08 08:22:31 -0500 asked a question CentOS7 OSP RDO (rocky) on DELL R630 cannot provision / introspect from TripleO undercloud

Hi, I am using CentOS with rdo rocky, with no-heat option. I have 1 interface, on which I will do PXE boot and I am able to access DELL iDRAC.

I am able to ssh to idrac from undercloud host. But I am not able to do introspection.

Not sure where it stops...

When I power on Server, from openstack baremetal node list I can see that it has updated power state, but it looks like it cannot set it to boot to PXE and or even boot from PXE. When I force server to do so (boot from pxe). Also it looks like it is not able to send boot/reboot/start/stop commands to idrac...

I have python-dracclient:

python-dracclient.noarch        1.5.0-1.el7              @centos-openstack-rocky
According to https://docs.openstack.org/ironic/lat... should be version 1.3.0+. Nodes file:
{
    "nodes": [
        {
            "name": "h00811",
            "pm_type": "idrac",
            "ports": [
                {
                    "address": "24:6E:96:14:B3:7C",
                    "physical_network": "ctlplane"
                }
            ],
            "cpu": "2",
            "memory": "4096",
            "disk": "40",
            "arch": "x86_64",
            "pm_user": "root",
            "pm_password": "calvin",
            "pm_addr": "10.19.30.11",
            "_comment": "Room 1 - Rack A - Unit 22/24",
            "capabilities": "profile:compute,boot_option:local"
        }
    ]
}
I have tried changing **pm_type** to **idrac** and **ipmi**, but with ipmi it even do not receive Power state. I use DELL R630's as compute/controllers. --- tcpdump show activity in **https** with an idrac IP. --- When I boot server manually to PXE, it do not catch PXE boot, but from undercloud I see requests, but no response...
18:11:02.561870 24:6e:96:05:7f:5c > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 590: (tos 0x0, ttl 128, id 3, offset 0, flags [none], proto UDP (17), length 576)
    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 24:6e:96:05:7f:5c, length 548, xid 0x96057f5c, secs 12, Flags [Broadcast] (0x8000)
      Client-Ethernet-Address 24:6e:96:05:7f:5c
      Vendor-rfc1048 Extensions
        Magic Cookie 0x63825363
        DHCP-Message Option 53, length 1: Discover
        Parameter-Request Option 55, length 36: 
          Subnet-Mask, Time-Zone, Default-Gateway, Time-Server
          IEN-Name-Server, Domain-Name-Server, RL, Hostname
          BS, Domain-Name, SS, RP
          EP, RSZ, TTL, BR
          YD, YS, NTP, Vendor-Option
          Requested-IP, Lease-Time, Server-ID, RN
          RB, Vendor-Class, TFTP, BF
          Option 128, Option 129, Option 130, Option 131
          Option 132, Option 133, Option 134, Option 135
        MSZ Option 57, length 2: 1260
        GUID Option 97, length 17: 0.68.69.76.76.90.0.16.87.128.90.180.192.79.71.57.50
        ARCH Option 93, length 2: 0
        NDI Option 94, length 3: 1.2.1
        Vendor-Class Option 60, length 32: "PXEClient:Arch:00000:UNDI:002001"

/var/log/messages contains:

Jan 18 08:47:42 seliius17649 registry: 10.196.173.111 - - [18/Jan/2019:08:47:42 +0100] "OPTIONS / HTTP/1.0" 200 0 "" ""
Jan 18 08:47:43 seliius17649 dnsmasq-dhcp[4317]: 2550497116 available DHCP range: 10.196.173.70 -- 10.196.173.85
Jan 18 08:47:43 seliius17649 dnsmasq-dhcp[4317]: 2550497116 vendor class: PXEClient:Arch:00000:UNDI:002001
Jan 18 08 ...
(more)
2019-01-03 01:40:41 -0500 received badge  Teacher (source)
2019-01-02 11:39:06 -0500 answered a question Windows instance can not reach metadata?

1) Create VM with config drive.

2) if 1st does not work, check "netstat -rn" (it should be able to reach/added 169.254.254.254 ?? I do not remember IP address by heart).

2019-01-02 11:13:44 -0500 commented question Enable SELinux on KVM Guest

as far as I remember, on Debian and others it might be that you need to recreate FS with additional space for SE Linux labels to fit. I have had this issue in Deb6 or Deb5... not sure if it was changed, due to a limited use case on Debian.

2019-01-02 11:07:52 -0500 answered a question OpenStack Certification Exam, Study Guide and Sample Exams

Depends on which distro you want it in.

Also Linux Foundation Certification has a course for that and exam.

To make your passed exam you will need to have previous level exams.

Best exam practice, is to set it up and ask someone to use it and try doing many things which would break it then fix it with least impact without reinstall :)

2019-01-02 11:03:12 -0500 received badge  Editor (source)
2019-01-02 11:02:53 -0500 received badge  Notable Question (source)
2019-01-02 11:02:53 -0500 received badge  Popular Question (source)
2018-12-20 03:14:33 -0500 answered a question tripleo behind proxy cannot download from docker.io

What I did, I still didn't use containers in Rocky, but at least all other components are fresh :)

undercloud# yum install -y centos-release-openstack-rocky.noarch
undercloud# yum update -y
undercloud# yum install -y python-tripleoclient ceph-ansible
undercloud# sync ; sync ; reboot
stack@undercloud$ openstack undercloud install --use-heat=False
stack@undercloud$ cp -ar /etc/yum.repos.d repos
stack@undercloud$ sed -i 's/gpgcheck=1/gpgcheck=0/g' repos/*repo
stack@undercloud$ export DIB_YUM_REPO_CONF="$(ls /home/stack/repos/*repo)"
stack@undercloud$ export STABLE_RELEASE="rocky"
stack@undercloud$ export no_proxy="localhost,127.0.0.1,`hostname -f`"
stack@undercloud$ sudo mkdir /var/lib/ironic/httpboot/
stack@undercloud$ sudo chown -R ironic:ironic /var/lib/ironic
stack@undercloud$ sudo sed -i '/disable-nouveau/d' /usr/share/openstack-tripleo-common/image-yaml/overcloud-images.yaml
stack@undercloud$ openstack overcloud image build
stack@undercloud$ source stackrc
stack@undercloud$ openstack overcloud image upload
stack@undercloud$ 

Do not think it is a good solution, but that at least helped me to move forward...

2018-12-18 04:19:17 -0500 answered a question rocky linux_bridge selfsevice network router interface down

You need to set gateway and if you specified IP for GW on a subnet, so Router should have that IP address assigned.

2018-12-18 03:51:57 -0500 asked a question tripleo behind proxy cannot download from docker.io

hi all, I have an environment, with a internet access only via proxy. I cannot make skopeo download docker, even I have my proxy set in env, in /etc/profile.d/proxy.sh, OR systemd edit docker...

here is an output I get:

Exception: Error inspecting image: docker://docker.io/tripleorocky/centos-binary-cron:current-tripleo
time="2018-12-14T14:06:14+01:00" level=fatal msg="pinging docker registry returned: Get https://registry-1.docker.io/v2/: dial tcp 34.206.236.31:443: i/o timeout" 

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/tripleo_deploy.py", line 1060, in _standalone_deploy
    parsed_args)
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/tripleo_deploy.py", line 678, in _deploy_tripleo_heat_templates
    self._prepare_container_images(env, parsed_args)
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/tripleo_deploy.py", line 656, in _prepare_container_images
    env, roles_data, dry_run=True)
  File "/usr/lib/python2.7/site-packages/tripleo_common/image/kolla_builder.py", line 167, in container_images_prepare_multi
    modify_only_with_labels=modify_only_with_labels,
  File "/usr/lib/python2.7/site-packages/tripleo_common/image/kolla_builder.py", line 268, in container_images_prepare
    images, tag_from_label)
  File "/usr/lib/python2.7/site-packages/tripleo_common/image/image_uploader.py", line 452, in discover_image_tags
    discover_args):
  File "/usr/lib/python2.7/site-packages/concurrent/futures/_base.py", line 605, in result_iterator
    yield future.result()
  File "/usr/lib/python2.7/site-packages/concurrent/futures/_base.py", line 429, in result
    return self.__get_result()
  File "/usr/lib/python2.7/site-packages/concurrent/futures/thread.py", line 62, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python2.7/site-packages/tripleo_common/image/image_uploader.py", line 556, in discover_tag_from_inspect
    i = DockerImageUploader._inspect(image_url.geturl(), insecure)
  File "/usr/lib/python2.7/site-packages/tenacity/__init__.py", line 241, in wrapped_f
    return self.call(f, *args, **kw)
  File "/usr/lib/python2.7/site-packages/tenacity/__init__.py", line 330, in call
    start_time=start_time)
  File "/usr/lib/python2.7/site-packages/tenacity/__init__.py", line 297, in iter
    raise retry_exc.reraise()
  File "/usr/lib/python2.7/site-packages/tenacity/__init__.py", line 136, in reraise
    raise self.last_attempt.result()
  File "/usr/lib/python2.7/site-packages/concurrent/futures/_base.py", line 422, in result
    return self.__get_result()
  File "/usr/lib/python2.7/site-packages/tenacity/__init__.py", line 333, in call
    result = fn(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/tripleo_common/image/image_uploader.py", line 383, in _inspect
    (image, err))
ImageUploaderException: Error inspecting image: docker://docker.io/tripleorocky/centos-binary-cron:current-tripleo
time="2018-12-14T14:06:14+01:00" level=fatal msg="pinging docker registry returned: Get https://registry-1.docker.io/v2/: dial tcp 34.206.236.31:443: i/o timeout" 

None
Preserving deployment artifacts
Install artifact is located at /home/stack/undercloud-install-20181214130614.tar.bzip2

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Deployment Failed!

ERROR: Heat log files: /var/log/heat-launcher/undercloud_deploy-g1hlP0

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Deployment failed.

Here is my undercloud.conf:

$ egrep -v "^$|^#" undercloud.conf 
[DEFAULT]
undercloud_hostname = lmcccp17649.cloud.com
local_ip = 198.168.230.253/24
undercloud_public_host = 192.168.230.253
undercloud_admin_host = 192.168.230.253
undercloud_nameservers = 10.1.5.40,10.1.9.20
undercloud_ntp_servers = 10.1.5.40,10.1.9.20
overcloud_domain_name = rdo.cloud.com
generate_service_certificate = true
local_interface = eth1
local_mtu = 1500 ...
(more)
2018-12-18 03:47:30 -0500 marked best answer heat template for Mitaka release with a loop

Hi team,

My heat template looks like this:

---
description: "blah
blah"
heat_template_version: 2016-04-08
parameters:
  flavor_name:
    default: SMALL
    type: string
  image_id:
    default: centos
    type: string
  public_net:
    default: d8772e7a-07b1-4273-beb6-860fb54e54c1
    type: string
  subnetwork:
    default: b4cb500a-aa47-4f74-8fe4-d68ddc94c94b
    type: string
  secgroup_id:
    default: default
    type: string
resources:
  server1:
    properties:
      flavor:
        get_param: flavor_name
      image:
        get_param: image_id
      name: Server1
      networks:
        - 
          port:
            get_resource: port1x10
    type: "OS::Nova::Server"
  port1:
    properties:
      name: port1
      fixed_ips:
        - subnet_id: { get_param: subnetwork }
        - subnet_id: { get_param: subnetwork }
        - subnet_id: { get_param: subnetwork }
        - subnet_id: { get_param: subnetwork }
        - subnet_id: { get_param: subnetwork }
        - subnet_id: { get_param: subnetwork }
        - subnet_id: { get_param: subnetwork }
        - subnet_id: { get_param: subnetwork }
        - subnet_id: { get_param: subnetwork }
      network_id:
        get_param: public_net
      security_groups:
        - 
          get_param: secgroup_id
    type: "OS::Neutron::Port"

My "mission" to remove repeating lines: "- subnet_id: { get_param: subnetwork }"

I was looking at count: 180 but count is not recognised in here... I found

repeat:
  for_each:
    var: list
  template:
    - subnet_id: { get_param: subnetwork }

But how to make this list so I could add like 180 or 110 and 70 IP's to the port... ? Any ideas?

2018-12-18 03:47:30 -0500 received badge  Scholar (source)
2018-12-18 03:47:13 -0500 received badge  Famous Question (source)
2018-09-10 19:10:26 -0500 received badge  Notable Question (source)
2018-09-10 01:18:04 -0500 received badge  Popular Question (source)