10 Commits

Author SHA1 Message Date
Andreas Jaeger
7114e79485 Check ACLs for all namespaces
Remove hardcoded list of namespaces with iterating over all directories
in the check of valid ACLs.

Remove parameter, we don't need to pass it in.

Be more verbose and report directories scanned and number of ACL files
read.

Change-Id: I4193ac59b431d31f3ce835c93950745e5b742418
2019-05-31 21:53:03 +02:00
Andreas Jaeger
ef188ee2f6 Fix gerrit/projects.yaml sort order
Our linters fail due to wrong sorting, fix it.

Also, fix tools/check_valid_gerrit_config.sh, openstack-dev is dead now.
(the file needs a better fix, will do a followup)

Change-Id: Iaa330a3f9507cb065ee8b3a11d91abdadb455cf2
2019-05-31 20:02:26 +02:00
Andreas Jaeger
c0b40b37e0 Silence bashate
The remaining bashate warnings was E042:
 The return value of "local" is always 0; errors in subshells
 used for declaration are thus hidden and will not trigger "set
 -e".

Fix the few cases this triggered so that we don't get confused anymore
about the message.

Remove -v from bashate invocation, we don't need to print out all the
filenames anymore.

Change-Id: I47991a7040c8b9183bc72cce8e5d95b2cec7e6c5
2018-03-26 09:13:55 +02:00
Andreas Jaeger
5e7ad13490 Improve gerrit checks messages
For tools/check_valid_gerrit_projects.py:
* Improve one error message to mention the project as well.

For tools/check_valid_gerrit_config.sh:
* Remove output for each ACL we check, we output the entry if it's
  wrong. But with 800+ ACL lines, we should not output 800+ lines of
  progress and thus make it hard to find the one failing line.

Change-Id: I4434c0f0bf65a1eb69889a2362c1abae7119fdd7
2016-09-13 13:57:48 +02:00
Steve Kowalik
85a0f4f44f Switch to using $() for subshells, part 1
Cleanup every use of `` for subshells in the nodepool and tools
directory , replacing them with $(), and finally making the scripts
consistent.

Change-Id: I2b05cd20f9c9a30ab88f8db235aa81da93b1fad3
2015-06-04 15:30:55 +10:00
Doug Hellmann
561ac5dc82 Add detail to gerrit ACL normalization errors
When the ACL file normalization checker failed it only mentioned the
filename, with the actual error output from diff potentially many many
lines up in the scrollback. This change saves the diff output so it can
be reported at the end of the run where the failure happens.

Change-Id: I862f755c6ed96208c0fe8255175afb48847f8cad
2015-03-10 20:00:28 +00:00
armando-migliaccio
a3034dfcbe Add openstack-infra to the list of namespaces to check.
Change-Id: I8ff59dccc06df7ab23d13eca6990418f3a547d34
2014-12-19 11:44:03 -08:00
armando-migliaccio
af09d7ca4b Extend ACL checks to OpenStack namespace.
Change-Id: I0ac6ee99391f218fa467b58bf39934c6c68d1808
2014-12-17 14:03:31 -08:00
Andreas Jaeger
d8416301e8 Check that Gerrit ACL files are normalized
Enhance Gerrit ACL check to check that the files are properly
normalized.

Co-Authored-By: Armando Migliaccio <armamig@gmail.com>

Change-Id: I9cdee60e77dab9c6943626d5fa1eda0402840277
2014-12-15 23:04:12 -08:00
armando-migliaccio
e6573ea752 Add test for validating certain gerrit ACL rules
This patch adds a check for Gerrit ACL configs. In this initial
version, the test being added checks that the config defines
at least one team that acts as a core/admin one.

The current check is intentially pretty loose to ensure some
flexibility.

Currently the check applies to stackforge and openstack-dev only.

Change-Id: I2b04f2d94130699d6fd1c16a9b00b9c81d1ba07d
2014-12-15 23:03:03 -08:00