Bug #16167

move classes.pp from manifests to its own module

Added by groente 2018-11-28 15:52:35 . Updated 2018-11-29 13:27:02 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Infrastructure
Target version:
Start date:
2018-11-28
Due date:
% Done:

100%

Feature Branch:
puppet-lizard-manifest:bugfix/16167-move-classes-to-module
Type of work:
Sysadmin
Blueprint:

Starter:
Affected tool:
Deliverable for:

Description


Subtasks


Related issues

Related to Tails - Bug #11181: Better abstraction of ::local::node In Progress 2016-02-29

History

#1 Updated by groente 2018-11-28 16:06:25

  • Status changed from Confirmed to In Progress
  • Assignee changed from groente to intrigeri
  • % Done changed from 0 to 20
  • QA Check set to Ready for QA
  • Feature Branch set to puppet-lizard-manifest:bugfix/16167-move-classes-to-module

#2 Updated by intrigeri 2018-11-29 10:50:38

  • related to Bug #11181: Better abstraction of ::local::node added

#3 Updated by intrigeri 2018-11-29 10:51:41

  • Assignee changed from intrigeri to groente
  • QA Check changed from Ready for QA to Dev Needed

I think Puppet won’t find the user::* classes. On Bug #11181#note-30 I wrote “we need at least some of the code from classes.pp to be moved to proper modules that work with Puppet autoloading” (emphasis added today). So I think each such class must be in its own file and should be renamed to tails_private::user::xyz.

lizard::postfix::canonical_senders should keep working but while you’re at it, you could extract it to its own file as well? Not a blocker here, of course.

#4 Updated by groente 2018-11-29 11:24:26

  • QA Check changed from Dev Needed to Ready for QA

i’ve split both users and canonical_sender up in separate files

#5 Updated by groente 2018-11-29 11:59:02

  • Assignee changed from groente to intrigeri

#6 Updated by intrigeri 2018-11-29 12:15:56

  • Assignee changed from intrigeri to groente
  • QA Check changed from Ready for QA to Dev Needed

Much better \o/

The only bit I’m not a fan of is the tails_private::postfix::canonical_senders name: there’s a reason (Bug #11181#note-1) why I’ve put it into the lizard:: namespace in the first place. All this will be quite ugly anyway until someone takes care of Bug #11181 but that’s out of scope here, so until then, I’d rather not regress on this front, so what about calling it tails_private::postfix::lizard_canonical_senders?

Nitpicking: please write include ::tails_private::hosts to be consistent with the 2 following lines :)

And finally, please update the keys in Hiera when the corresponding class has moved, e.g. git grep -E '^user::' -- hieradata. Otherwise this Hiera data will be ignored and who knows what will happen once we deploy it :)

#7 Updated by groente 2018-11-29 12:41:36

  • Assignee changed from groente to intrigeri
  • QA Check changed from Dev Needed to Ready for QA

okay, how about now?

#8 Updated by intrigeri 2018-11-29 13:27:02

  • Status changed from In Progress to Resolved
  • Assignee deleted (intrigeri)
  • Target version set to Tails_3.11
  • % Done changed from 20 to 100
  • QA Check changed from Ready for QA to Pass

LGTM! Deployed and running puppet agent --test everywhere didn’t change anything, as intended. Before that I had disabled the agent everywhere except on my own Jenkins and ensured it worked fine there first (including deleting a user and ensuring Puppet re-creates it). So this looks like a successful refactoring to me! \o/ Now, of course we’ll only know for sure next time we set up a new system from scratch, which I’ll do soon for Bug #16121 anyway.