config/sysinv/sysinv/sysinv/sysinv/agent
Charles Short cc27551a8e Remove unsafe umask usage
The sysinv code runs under eventlet that causes the
running greenthread to swap out the original umask. This
results in the sysinv code running with the incorrect umask.

This can be demonstrated by the "system dns-modify" command,
the agent process starts with a umask of 022, switched to 0,
and is never restored.

This simple fix is to audit where os.umask is being used and
replace os.umask with os.chmod.

Testing has been done locally by:

1. Running the "system dns-modify nameservers=8.8.8.8,8.8.4.4" command
   and checking the results/permissions of /etc/resolv.conf. Also,
   cheked to see if the umask flag have been changed in /proc/XXX/status
   before and after running the command.
2. Running an "system applicaton-upload" command on an installed helm
   armada package, these are located in /usr/local/share/application/helm.
   After the application upload, the application-apply should be
   "applied" without error/failure as shown in "system
   application-list".
3. Running a distributed-cloud and checking for any errors. The command
   "dcmanager subcloud show <subcloudname>" should show the identity
   service in sync after the dcmanager subcloud manage <>".

Closes-Bug: 1915955

Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I16ce695cfc4f6fb496ac0b3287906cc968ec5e98
2021-03-11 08:46:20 -05:00
..
lldp Resolving not-callable 2020-12-09 14:28:02 -05:00
__init__.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
disk.py Add support for disk wiping without GPT formatting 2020-10-21 22:49:52 +00:00
lvg.py Introduce rook ceph 2021-01-27 06:46:02 +08:00
manager.py Remove unsafe umask usage 2021-03-11 08:46:20 -05:00
node.py Deprecate sysinv.openstack.common.log 2019-11-05 15:29:20 -06:00
partition.py Introduce rook ceph 2021-01-27 06:46:02 +08:00
pci.py Resolving not-callable 2020-12-09 14:28:02 -05:00
pv.py Introduce rook ceph 2021-01-27 06:46:02 +08:00
rpcapi.py Introduce rook ceph 2021-01-27 06:46:02 +08:00