Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1612088 - [OSP13] Instance HA is broken due to nova-compute container always restarting
[OSP13] Instance HA is broken due to nova-compute container always restarting
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates (Show other bugs)
13.0 (Queens)
All Linux
urgent Severity urgent
: z2
: 13.0 (Queens)
Assigned To: Michele Baldessari
pkomarov
: Triaged, ZStream
: 1611994 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-08-03 08:52 EDT by Michele Baldessari
Modified: 2018-08-29 13:02 EDT (History)
4 users (show)

See Also:
Fixed In Version: openstack-tripleo-heat-templates-8.0.4-15.el7ost
Doc Type: No Doc Update
Doc Text:
No doc needed as this was an interim regression that should not hit customers
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-08-29 12:39:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1785245 None None None 2018-08-03 08:52 EDT
OpenStack gerrit 588880 None stable/queens: MERGED tripleo-heat-templates: Revert shebang change for InstanceHA startup script (I96f82421638581122d687492f7420fd5724a7207) 2018-08-06 11:50 EDT
OpenStack gerrit 589432 None master: NEW tripleo-heat-templates: Move the shebang to /usr/bin/python (Iac4236bebab609e78b089b809a433d62c60e28c2) 2018-08-07 10:12 EDT
Red Hat Product Errata RHBA-2018:2574 None None None 2018-08-29 12:40 EDT

  None (edit)
Description Michele Baldessari 2018-08-03 08:52:34 EDT
Description of problem:
Via change Id915ded03ae5a471ffa2dca13e2da90021279f63 we did the following:
--- a/extraconfig/tasks/instanceha/check-run-nova-compute
+++ b/extraconfig/tasks/instanceha/check-run-nova-compute
@@ -1,4 +1,4 @@
-#!/bin/python -utt
+#!/usr/bin/env python -utt

 import os
 import sys

The problem is that the above script gets invoked via 'exec' in kolla here:
https://github.com/openstack/tripleo-heat-templates/blob/master/docker/services/nova-compute.yaml#L161

Because kolla's start.sh invokes the script in the container via 'exec'.
Exec won't support multiple multiple commands and errors out as follows:
+ echo 'Running command: '\''/var/lib/nova/instanceha/check-run-nova-compute '\'''
+ exec /var/lib/nova/instanceha/check-run-nova-compute
Running command: '/var/lib/nova/instanceha/check-run-nova-compute '
/usr/bin/env: python -utt: No such file or directory
Comment 1 Michele Baldessari 2018-08-04 11:52:00 EDT
*** Bug 1611994 has been marked as a duplicate of this bug. ***
Comment 8 Jon Schlueter 2018-08-07 01:15:57 EDT
Patch fails repoclosure yum install /bin/python not available
Comment 9 Michele Baldessari 2018-08-07 02:00:56 EDT
(In reply to Jon Schlueter from comment #8)
> Patch fails repoclosure yum install /bin/python not available

Hi John,

can you clarify the above a bit? We simply reverted the broken bits to the tested state we had before (aka /bin/python). Also this code runs only inside the nova_compute container and things seem okay there?
| 37f0e3df-9235-4feb-9f84-4867e15eeef8 | compute-0    | ACTIVE | -          | Running     | ctlplane=192.168.24.12 |

(undercloud) [stack@undercloud-0 ~]$ ssh -l heat-admin 192.168.24.12 "sudo docker exec nova_compute sh -c 'ls -l /bin/python'"
Warning: Permanently added '192.168.24.12' (ECDSA) to the list of known hosts.
lrwxrwxrwx. 1 root root 7 Jul 14 14:23 /bin/python -> python2

What are we missing?

thanks,
Michele
Comment 10 Jon Schlueter 2018-08-07 10:18:50 EDT
from IRC discussions, recapping

yum install /bin/python ==> gives nothing
yum install /usr/bin/python ==> works

Something in rpm building scrapes through scripts for shebang lines and adds them as Requires to the built rpm.
Comment 16 errata-xmlrpc 2018-08-29 12:39:25 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:2574

Note You need to log in before you can comment on or make changes to this bug.