Page MenuHomePhabricator

Fix maps puppet to make sure apt-get update runs after configuration change
Closed, ResolvedPublic

Description

We ran into some issues when updating maps1003 from jessie to stretch. There was a config(hieradata) change that make sure we use cassandra-2.2 version. Puppet fails with this error:

Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold --force-yes install cassandra=2.2.6-wmf5' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Version '2.2.6-wmf5' for 'cassandra' was not found
Error: /Stage[main]/Cassandra/Package[cassandra]/ensure: change from purged to 2.2.6-wmf5 failed: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold --force-yes install cassandra=2.2.6-wmf5' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Version '2.2.6-wmf5' for 'cassandra' was not found

running apt-get update manually fixed this.
We should look at the puppet config to make sure apt-get update runs after any config change. or package version change.

Event Timeline

CDanis triaged this task as Medium priority.Jan 17 2019, 7:57 PM

Looking at the code:

Conclusion: the code looks correct, but isn't working. Another pair of eyes would be welcomed!

@Gehel I would say what's missing is a clear dependency between the installation of the cassandra package and the apt-get update.

We'll need to check if that creates some dependency cycle though.

Change 490303 had a related patch set uploaded (by Gehel; owner: Gehel):
[operations/puppet@production] cassandra: package should be installed after apt-get update

https://gerrit.wikimedia.org/r/490303

Change 490303 merged by Gehel:
[operations/puppet@production] cassandra: package should be installed after apt-get update

https://gerrit.wikimedia.org/r/490303

Gehel claimed this task.