Commit Graph

8 Commits

Author SHA1 Message Date
Monty Taylor 6bd802239f Retire repo
Depends-On: https://review.opendev.org/720892
Change-Id: I4944284ff2900bd607992a3884e7f1ee38d7e100
2020-04-22 10:24:35 -05:00
Ian Wienand 2ebab74d16 accessbot logs : add timestamp and rotate
Change-Id: I7ec6a4a38197acd33704d950d205895ce45e6708
2018-08-02 12:44:52 +10:00
Colleen Murphy 593e930d71 Fix beaker on xenial
Since the beaker jobs are being run on xenial, we need a special nodeset
for it, otherwise beaker gives an error:

 beaker-hostgenerator was not able to use this value as input.
 Exiting with an Error.

We also want to install puppet from the Ubuntu repos rather than from
puppetlabs, since puppetlabs doesn't support puppet 3 for Xenial. For
centos we can keep the install process the same.

This patch includes additional fixes for issues that were probably
present when the tests were first merged:

- make sure the irc pip package is installed by the puppet class
- use double quotes for the channels.yaml fixture so properly render the
  newline characters
- add "access" and "global" sections to the channels.yaml fixture since
  accessbot will otherwise be unable to parse the file
- remove spec assertions about the accessbot process, because if it was
  successful it should have exited during the puppet run, and in fact if
  it didn't exit the puppet run would have failed.
- correct the group name the spec is asserting of the config file

Additionally, out of band from this patch, the nick 'accessbot-test' is
nowregistered on freenode. If it's not registered, it becomes stuck in
the irc infinite loop without performing any actions. This does not mean
it has any permissions to make any real access changes.

Change-Id: Ifd2244ae9dd212b2475f9cd6adb994bc058a4769
Depends-On: I23d0a9c0f4b6ecbb3403447adb03e845d2695366
2017-06-10 20:03:53 +02:00
Andrey Nikitin d8f05dc545 Order of the class parameters is refactored
Order of those parameters is changed
to follow Puppet Style Guide recommendation [0].
Moreover, it will allow to an user to find much faster
a variable in a list of variables.

[0]. https://docs.puppetlabs.com/guides/style_guide.html

Change-Id: I4dc302b7d1aa13b5bd02eb5c5c52b79fd4beebdc
2016-03-20 01:32:36 +03:00
Colleen Murphy 6771d4f8ce Remove empty string defaults from class parameters
In preparation for puppet 4, the puppet-lint-empty_string-check gem
helps find where empty strings are assigned to variables because how
empty strings are evaluated changes in puppet 4, so the easiest thing
is to just remove usage of them.

More importantly, it is not appropriate to set defaults for parameters
that are, realistically, required. If the users leaves these parameters
blank, puppet will apply most resources successfully but fail
mysteriously on the Exec['run_accessbot'] resource, causing the user to
spend additional time debugging. If no defaults are provided in the
puppet class, puppet fill fail with a message stating that the user
must supply values. This "fail fast" approach is much preferred to
debugging obtuse python tracebacks.

This change is technically backwards-incompatible. However, it will not
break Infra because we are already supplying these parameters via
system-config/modules/openstack_project/manifests/eavesdrop.pp. If
there are other users using this module and they are not passing in
these parameters, then their accessbots cannot possibly be running.

An alternative approach is to supply undef as parameter defaults. This
will allow the puppet-lint gem to pass, but does not help the user at
all.

Change-Id: I046340b852e7e8983b741e5bad415678977bea0d
2015-07-02 15:58:45 -07:00
Jeremy Stanley 80bbf87bb7 Finish puppeting accessbot
Change-Id: I329545d815cbacf717aa86a4d140290419be9810
2014-04-09 20:56:36 +00:00
Monty Taylor 59489655fc Remove files from puppet urls
puppet:/// fileserver urls do not need 'files' in the middle of them.

Change-Id: Ib2c39fd0d9fb4c57451cd28136ca9733eb232ae4
2014-03-23 08:14:57 -07:00
James E. Blair f7e2d26333 Add a script to manage IRC perms
Run it whenever there is a change to the YAML channel config.

The script will ensure everyone listed in global has those perms
and anyone else found with access on a channel will be left as-is
except that their access will be limited to the relevant mask.

Move it and the previous change to add a permission checking
script into a new module, 'accessbot'.

Support SSL in both scripts.

Add a 1 second sleep in the check script to avoid flood protection.

Add all known channels to the channel config.

Closes-Bug: 1190296
Change-Id: I5072cb56ae83a70f4fa955362b8db909b2956d70
2014-03-10 17:26:34 -07:00