Skip to content

Instantly share code, notes, and snippets.

View antonym's full-sized avatar
👨‍💻

Antony Messerli antonym

👨‍💻
View GitHub Profile
root@rpco-liberty:~# cp /etc/openstack_deploy/user_variables.yml /etc/openstack_deploy/user_variables.yml.orig
root@rpco-liberty:~# # Remove horizon static files variables from user_variables.yml as this is now
root@rpco-liberty:~# # maintained in group_vars.
root@rpco-liberty:~# if grep '^rackspace_static_files_folder\:' /etc/openstack_deploy/user_variables.yml; then
> sed -i '/^rackspace_static_files_folder:.*/d' /etc/openstack_deploy/user_variables.yml
> fi
rackspace_static_files_folder: /opt/rpc-openstack/rpcd/playbooks/roles/horizon_extensions/files
root@rpco-liberty:~#
root@rpco-liberty:~# # Remove horizon_custom_uploads block from user_variables.yml as this is maintained in
root@rpco-liberty:~# # group_vars
@antonym
antonym / gist:4d0254ea3c68f5d1f78ad458a40fcff3
Created September 26, 2017 13:58
Liberty->Newton Issues
Fails on last playbook (os-cinder-install.yml) need a flag?
TASK [Perform online data migrations] ******************************************
fatal: [rpco-liberty_cinder_api_container-e0e91887]: FAILED! => {"failed": true, "msg": "The conditional check 'ansible_local['openstack_ansible']['cinder']['need_online_data_migrations'] | bool' failed. The error was: error while evaluating conditional (ansible_local['op
enstack_ansible']['cinder']['need_online_data_migrations'] | bool): 'dict object' has no attribute 'need_online_data_migrations'\n\nThe error appears to have been in '/opt/leap42/openstack-ansible-14.2.7/playbooks/os-cinder-install.yml': line 215, column 7, but may\nbe el
sewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n tasks:\n - name: Perform online data migrations\n ^ here\n"}
root@localhost:/tasks# cat /etc/lldpd.conf
unconfigure lldp custom-tlv
root@localhost:/tasks# systemctl restart lldpd
root@localhost:/tasks# lldpctl -f keyvalue
lldp.eno1.via=LLDP
lldp.eno1.rid=4
lldp.eno1.age=0 day, 00:00:08
lldp.eno1.chassis.mac=54:7f:ee:a5:79:6c
lldp.eno1.chassis.name=servers-lab-1.sat6
lldp.eno1.chassis.descr=Cisco Nexus Operating System (NX-OS) Software 6.0(2)U5(1)
root@localhost:~# lldpctl -f keyvalue
lldp.eno1.via=LLDP
lldp.eno1.rid=2
lldp.eno1.age=0 day, 03:33:53
lldp.eno1.chassis.mac=54:7f:ee:a5:79:6c
lldp.eno1.chassis.name=servers-lab-1.sat6
lldp.eno1.chassis.descr=Cisco Nexus Operating System (NX-OS) Software 6.0(2)U5(1)
TAC support: http://www.cisco.com/tac
Copyright (c) 2002-2015, Cisco Systems, Inc. All rights reserved.
lldp.eno1.chassis.mgmt-ip=10.127.5.250
2017-03-16 21:46:38.620 14716 ERROR craton.api.v1.resources.inventory.hosts [req-a5a52266-1b25-488e-bd47-9ed2d096812b - - - - -] Error during Hosts.get: (_mysql_exceptions.OperationalError) (1305, 'FUNCTION craton.json_contains does not exist') [SQL: 'SELECT variables.key_ AS variables_key_, variables.value_ AS variables_value_, variables.created_at AS variables_created_at, variables.updated_at AS variables_updated_at, variables.association_id AS variables_association_id \nFROM variables \nWHERE variables.key_ = %s AND json_contains(json_extract(variables.value_, %s), %s)'] [parameters: ('macs', '$', '"00:0c:29:72:d9:5a"')]
MariaDB [craton]> select * from variable_association;
+---------------------+------------+----+---------------+
| created_at | updated_at | id | discriminator |
+---------------------+------------+----+---------------+
| 2017-03-14 22:52:05 | NULL | 1 | project |
| 2017-03-14 22:52:05 | NULL | 2 | user |
| 2017-03-14 22:52:18 | NULL | 3 | cloud |
| 2017-03-14 22:52:26 | NULL | 4 | region |
| 2017-03-14 22:52:33 | NULL | 5 | cell |
| 2017-03-14 22:53:43 | NULL | 6 | device |
Traceback (most recent call last):
File "/usr/lib/python3.5/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "/usr/local/lib/python3.5/dist-packages/webob/dec.py", line 131, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/local/lib/python3.5/dist-packages/webob/dec.py", line 196, in call_func
return self.func(req, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/oslo_middleware/request_id.py", line 37, in __call__
response = req.get_response(self.application)
File "/usr/local/lib/python3.5/dist-packages/webob/request.py", line 1316, in send
server=http://127.0.0.1:8080
headers=(-H "Content-Type: application/json" -H "X-Auth-Token: snip" -H "X-Auth-User: raxdemo1" -H "X-Auth-Project: 717e9a216e2d44e0bc848398563bdada")
curl $server/v1/clouds "${headers[@]}" -X POST -d '{"name": "darkcloud"}'
curl $server/v1/regions "${headers[@]}" -X POST -d '{"name": "region-1", "cloud_id": 1}'
curl $server/v1/cells "${headers[@]}" -X POST -d '{"cloud_id": 1, "region_id": 1, "name": "cell-1"}'
curl $server/v1/hosts "${headers[@]}" -X POST -d '{"cloud_id": 1, "region_id": 1, "cell_id": 1, "name": "osa-deploy", "ip_address": "10.127.5.110", "device_type": "server"}'
curl $server/v1/hosts/1/variables "${headers[@]}" -X PUT -d '{"os": "debian", "os_status": "installing"}'
curl $server/v1/hosts "${headers[@]}" -X POST -d '{"cloud_id": 1, "region_id": 1, "cell_id": 1, "name": "osa-node1", "ip_address": "10.127.5.111", "device_type": "server"}'
Traceback (most recent call last):
File "/usr/lib/python3.5/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "/usr/local/lib/python3.5/dist-packages/webob/dec.py", line 131, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/local/lib/python3.5/dist-packages/webob/dec.py", line 196, in call_func
return self.func(req, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/oslo_middleware/request_id.py", line 37, in __call__
response = req.get_response(self.application)
File "/usr/local/lib/python3.5/dist-packages/webob/request.py", line 1316, in send
Stacktrace
Traceback (most recent call last):
testtools.testresult.real._StringException: Empty attachments:
stderr
stdout
pythonlogging:'': {{{
2017-03-01 08:16:19,886 2538 INFO [tempest.lib.common.rest_client] Request (TestServerBasicOps:setUp): 200 GET http://172.29.236.100:8774/v2.1/6ad65ed9a988439bbabc7ebd9f563c1f/images/5dca0cc5-a8c2-48dd-994f-a42163c75f59 0.103s
2017-03-01 08:16:19,886 2538 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}