dlrnapi promoter script failing "ERROR promoter global name 'config_file' is not defined"

Bug #1757214 reported by Matt Young
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
John Trowbridge

Bug Description

Today (2018-03-08) @ 12:32 the promoters all started failing with the following:

2018-03-20 12:32:01,641 17656 ERROR promoter global name 'config_file' is not defined
Traceback (most recent call last):
  File "/home/centos/ci-config/ci-scripts/dlrnapi_promoter/dlrnapi_promoter.py", line 318, in <module>
    promoter(config)
  File "/home/centos/ci-config/ci-scripts/dlrnapi_promoter/dlrnapi_promoter.py", line 265, in promoter
    logger.info('STARTED promotion process with config %s', config_file)
NameError: global name 'config_file' is not defined

---

http://38.145.34.55/master.log
http://38.145.34.55/queens.log
http://38.145.34.55/pike.log
http://38.145.34.55/ocata.log

---

This is likely related to:

https://github.com/rdo-infra/ci-config/commit/dc8a4d63b29b1818c7cc2676748320ff28722155
https://review.rdoproject.org/r/#/c/12716/

```
-def promoter(config_file):
- config = ConfigParser.SafeConfigParser(allow_no_value=True)
- config.read(config_file)
-
- setup_logging(config.get('main', 'log_file'))
+def promoter(config):
     logger = logging.getLogger('promoter')

     release = config.get('main', 'release')
@@ -314,4 +310,11 @@ def promoter(config_file):
     if len(sys.argv) < 2:
         print("Usage: %s <config-file>" % sys.argv[0])
     else:
- promoter(sys.argv[1])
+ config = ConfigParser.SafeConfigParser(allow_no_value=True)
+ config.read(sys.argv[1])
+ setup_logging(config.get('main', 'log_file'))
+ logger = logging.getLogger('promoter')
+ try:
+ promoter(config)
+ except Exception as e:
+ logger.exception(e)
```

Which was merged on/about the same time

Revision history for this message
Matt Young (halcyondude) wrote :
Changed in tripleo:
assignee: nobody → John Trowbridge (trown)
status: Triaged → In Progress
Revision history for this message
John Trowbridge (trown) wrote :
Revision history for this message
Arx Cruz (arxcruz) wrote :

Fix was merged. Changing status to fix released.

Changed in tripleo:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.