dlrnapi promoter: promotion of older link > newer link
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
Critical
|
Matt Young |
Bug Description
The dlrn promoter [1] is promoting older symlinks atop newer symlinks. This was observed in ocata recently.
the following is roughly what's happened:
```
2018-03-16 03:34:16, a0/81/a081db24c
<snip/>
2018-03-08 10:43:57, ff/d1/ffd1c0125
2018-03-08 05:14:15, ff/d1/ffd1c0125
2018-03-08 01:43:34, ff/d1/ffd1c0125
```
On 3/8 [2] we promoted the following symlink:
https:/
Which was fine. This updated the current-
<snip>
2018-03-08 15:43:52,481 5969 INFO promoter sftp> ln -s /var/www/
</snip>
This link was created 3/8
---
then on 3/16 [4] we promoted a symlink that's older than previously promoted link! This was from 2/9. The snippit from that log is [5]
The full ocata promotion history log is here: [6] showing a unified progression (and the error). Current ocata state (which is presently incorrect) is shown on the RDO dashboard [7]
[1] https:/
[2] http://
[3] http://
[4] http://
[5] http://
[6] http://
[7] https:/
Changed in tripleo: | |
status: | Fix Committed → Fix Released |
Update. The ocata promoter is currently attempting to promote the most recent rdo1 hash:
2018-03-20 02:53:25,581 9490 INFO promoter Trying to promote current-tripleo-rdo to current- tripleo- rdo-internal
2018-03-20 02:53:29,525 9490 INFO promoter The currently promoted hash is {'timestamp': 1521185656, 'promote_name': 'current- tripleo- rdo-internal' , 'distro_hash': 'e0df978be1aa1d d7a133a2e017d14 96964bd2648' , 'user': 'ciuser', 'commit_hash': 'a081db24c546ed b189738376f5841 55f349060ed' }
2018-03-20 02:53:33,279 9490 DEBUG promoter Hashes fetched (tried to get the last 5): [{'timestamp': 1521056055, 'promote_name': 'current- tripleo- rdo', 'distro_hash': '19239ca40e09fe 11281233c55315e 306c9ecc1b1' , 'user': 'ciuser', 'commit_hash': '8d52b8c644cbfc 03c60a42058a2ec 723d821b684' }, {'timestamp': 1520504055, 'promote_name': 'current- tripleo- rdo', 'distro_hash': '756c2a382eb90d a3fc255e4813133 13829bdd5e1' , 'user': None, 'commit_hash': 'ffd1c0125f4a4a 96df68f779ed76d d5efd706b96' }, {'timestamp': 1519121659, 'promote_name': 'current- tripleo- rdo', 'distro_hash': 'e0df978be1aa1d d7a133a2e017d14 96964bd2648' , 'user': None, 'commit_hash': '98b61f4ceed804 e222c4cb22b45b2 3bc35ee833d' }, {'timestamp': 1518258254, 'promote_name': 'current- tripleo- rdo', 'distro_hash': 'e0df978be1aa1d d7a133a2e017d14 96964bd2648' , 'user': None, 'commit_hash': 'a081db24c546ed b189738376f5841 55f349060ed' }, {'timestamp': 1518171853, 'promote_name': 'current- tripleo- rdo', 'distro_hash': '302accd1ee673b 2c6323d38e02ec5 d77159bfe3b' , 'user': None, 'commit_hash': '7aadc716a7b309 92974a31281af9f feeb989c6f3' }]
## it finds the correct (next) hash to promote...
2018-03-20 02:53:44,832 9490 DEBUG promoter Remaining hashes after removing already promoted ones: [{'timestamp': 1521056055, 'promote_name': 'current- tripleo- rdo', 'distro_hash': '19239ca40e09fe 11281233c55315e 306c9ecc1b1' , 'user': 'ciuser', 'commit_hash': '8d52b8c644cbfc 03c60a42058a2ec 723d821b684' }]
## But then removes it because it determines that the hash is older than the one currently promoted...which is wrong...
2018-03-20 02:53:44,832 9490 DEBUG promoter Remaining hashes after removing ones older than the currently promoted: []
This is happening here:
https:/ /github. com/rdo- infra/ci- config/ blob/master/ ci-scripts/ dlrnapi_ promoter/ dlrnapi_ promoter. py#L193
```
latest_ hashes = [new_hashes for new_hashes in latest_hashes
if new_hashes[ 'timestamp' ] > old_hashes[ 'timestamp' ]] debug(' Remaining hashes after removing ones older than the '
if old_hashes is not None:
logger.
'currently promoted: %s', latest_hashes)
```