File "/usr/lib/python2.7/site-packages/wsmeext/pecan.py", line 85, in callfunction
result = f(self, *args, **kwargs)
File "/usr/lib64/python2.7/site-packages/sysinv/api/controllers/v1/storage_tier.py", line 257, in post
new_tier = _create(self, tier)
File "/usr/lib64/python2.7/site-packages/sysinv/api/controllers/v1/storage_tier.py", line 533, in _create
self._ceph.crushmap_tiers_add()
File "/usr/lib64/python2.7/site-packages/sysinv/common/ceph.py", line 407, in crushmap_tiers_add
self._crushmap_add_tier(t)
File "/usr/lib64/python2.7/site-packages/sysinv/common/ceph.py", line 390, in _crushmap_add_tier
self._crushmap_rule_add(tier.name, replicate_by=replicate_by)
File "/usr/lib64/python2.7/site-packages/sysinv/common/ceph.py", line 285, in _crushmap_rule_add
stdout, __ = cutils.execute(*cmd, run_as_root=False)
File "/usr/lib64/python2.7/site-packages/sysinv/common/utils.py", line 226, in execute
cmd=' '.join(cmd))
We need to do one of the following: change dir permissions or have the sysinv-api call the sysinv conductor to execute the command (the conductor has root permission).
Directory permissions for/opt/ platform/ sysinv/ 19.09 are as follows.
controller-0:~$ ls -al /opt/platform/ sysinv
total 12
drwxr-xr-x 3 root root 4096 Nov 21 22:40 .
drwxr-xr-x 12 root root 4096 Nov 21 23:01 ..
drwxr-xr-x 2 root root 4096 Nov 22 14:46 19.09
The traceback shows the sysinv-api is executing this ceph command:
Command: ceph osd getcrushmap -o /opt/platform/ sysinv/ 19.09/crushmap_ rule_update. bin sysinv/ 19.09/crushmap_ rule_update. bin: [Errno 13] Permission denied: '/opt/platform/ sysinv/ 19.09/crushmap_ rule_update. bin'\n" ". Detail:
Exit code: 1
Stdout: ''
Stderr: "Can't open output file /opt/platform/
Traceback (most recent call last):
File "/usr/lib/ python2. 7/site- packages/ wsmeext/ pecan.py" , line 85, in callfunction
result = f(self, *args, **kwargs)
File "/usr/lib64/ python2. 7/site- packages/ sysinv/ api/controllers /v1/storage_ tier.py" , line 257, in post
new_tier = _create(self, tier)
File "/usr/lib64/ python2. 7/site- packages/ sysinv/ api/controllers /v1/storage_ tier.py" , line 533, in _create _ceph.crushmap_ tiers_add( )
self.
File "/usr/lib64/ python2. 7/site- packages/ sysinv/ common/ ceph.py" , line 407, in crushmap_tiers_add _crushmap_ add_tier( t)
self.
File "/usr/lib64/ python2. 7/site- packages/ sysinv/ common/ ceph.py" , line 390, in _crushmap_add_tier _crushmap_ rule_add( tier.name, replicate_ by=replicate_ by)
self.
File "/usr/lib64/ python2. 7/site- packages/ sysinv/ common/ ceph.py" , line 285, in _crushmap_rule_add execute( *cmd, run_as_root=False)
stdout, __ = cutils.
File "/usr/lib64/ python2. 7/site- packages/ sysinv/ common/ utils.py" , line 226, in execute
cmd=' '.join(cmd))
ProcessExecutio nError: Unexpected error while running command. sysinv/ 19.09/crushmap_ rule_update. bin sysinv/ 19.09/crushmap_ rule_update. bin: [Errno 13] Permission denied: '/opt/platform/ sysinv/ 19.09/crushmap_ rule_update. bin'\n" nError: Unexpected error while running command.
Command: ceph osd getcrushmap -o /opt/platform/
Exit code: 1
Stdout: ''
Stderr: "Can't open output file /opt/platform/
: ProcessExecutio
With https:/ /opendev. org/starlingx/ config/ commit/ 089cd3f420b7e9d 5897fe4b811e467 8432652ef4, the sysinv-api is no longer running with root group and this commit https:/ /opendev. org/starlingx/ ansible- playbooks/ commit/ dcdeea025414923 3f1c0e5a6536a56 1cf7453cec has set permissions that will not allow the sysinv-api to write to this directory.
We need to do one of the following: change dir permissions or have the sysinv-api call the sysinv conductor to execute the command (the conductor has root permission).