SDP-627

tom_tyler (C. Thomas Tyler)
C. Thomas Tyler created this job , modified by swarm-user
Closed
Add verify_sdp.sh check for p4*.services files w/o world read access.

For some back story, see:
https://swarm.workshop.perforce.com/reviews/27656#comments

Note: verify_sdp.sh needs to be able to run as perforce, so it cannot
do something like `ls` to check file permissions. Instead, we want
to look for the specific error we get when a service file with an
expected name exists, but we just can't see its contents.

Say for example we do a 'systemctl cat p4d_1' and it doesn't exist
at all, we get:

  $ systemctl cat p4d_N.service
  No files found for p4d_1.service.

However, if the *.service file does exist and we simply can't see
its contents, we get a different error message.

  $ systemctl cat p4d_1.service
  Failed to cat /etc/systemd/system/p4d_1.service: Permission denied

If we get the "No files found for p4d_1.service", then we know no
such service exists.  If we get the "Permission denied" error, than
we know we have an error condition: The *.service exists, but has
the wrong permissions.
27720Fixed issue preventing systemd service checks from working.

Expanded scope of systemd checks to include any services related to
the instance based on namving convention (p4*_N*.service), in addition
to the checks for the 3 standard services (p4d_N/p4broker_N/p4p_N).
This would include, for example, p4dtg_1.
27719Fixed issue preventing systemd service checks from working.

Expanded scope of systemd checks to include any services related to
the instance based on namving convention (p4*_N*.service), in addition
to the checks for the 3 standard services (p4d_N/p4broker_N/p4p_N).
This would include, for example, p4dtg_1.

#review-27720
  • Details
  • Comments -
Status
Closed
Project
perforce-software-sdp
Severity
C
Reported By
C. Thomas Tyler
Reported Date
Modified By
swarm-user
Modified Date
Owned By
tom_tyler
Component
core-unix
Type
Feature