Missing sudoers record to allow privset-helper
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
manila (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
It seems the sudoers file installed by manila packages do not include the required records to allow usage of privsep-helper. Because of this lvm backend can't be used.
snippet in manila.conf
```
[DEFAULT]
enabled_
[lvm]
share_backend_
share_driver=
driver_
lvm_share_
```
The error seen in manila-share.log .
```
2023-12-07 02:59:16.941 42613 DEBUG manila.
2023-12-07 02:59:16.944 42613 INFO oslo.privsep.daemon [None req-7eb117c5-
2023-12-07 02:59:16.955 42613 WARNING oslo.privsep.daemon [-] privsep log: sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
2023-12-07 02:59:16.956 42613 WARNING oslo.privsep.daemon [-] privsep log: sudo: a password is required
2023-12-07 02:59:16.957 42613 CRITICAL oslo.privsep.daemon [None req-7eb117c5-
2023-12-07 02:59:16.958 42613 ERROR manila.
2023-12-07 02:59:16.958 42613 ERROR manila.
2023-12-07 02:59:16.958 42613 ERROR manila.
2023-12-07 02:59:16.958 42613 ERROR manila.
2023-12-07 02:59:16.958 42613 ERROR manila.
2023-12-07 02:59:16.958 42613 ERROR manila.
2023-12-07 02:59:16.958 42613 ERROR manila.
2023-12-07 02:59:16.958 42613 ERROR manila.
2023-12-07 02:59:16.958 42613 ERROR manila.
2023-12-07 02:59:16.958 42613 ERROR manila.
2023-12-07 02:59:16.958 42613 ERROR manila.
2023-12-07 02:59:16.958 42613 ERROR manila.
2023-12-07 02:59:16.958 42613 ERROR manila.
2023-12-07 02:59:16.958 42613 ERROR manila.
```
I have the same issue.
<log>
2024-02-19 04:35:17.458 15 INFO oslo.privsep.daemon [None req-d1f86b5f- e7ee-4cb4- bd15-999208c0e8 d1 - - - - - -] Running privsep helper: ['sudo', 'privsep-helper', '--config-file', '/etc/manila/ manila. conf', '--privsep_ context' , 'manila. privsep. sys_admin_ pctxt', '--privsep_ sock_path' , '/tmp/tmp6d52_ 7wc/privsep. sock'] e7ee-4cb4- bd15-999208c0e8 d1 - - - - - -] privsep helper command exited non-zero (1) share.manager [None req-d1f86b5f- e7ee-4cb4- bd15-999208c0e8 d1 - - - - - -] Error encountered during initialization of driver LVMShareDriver@ share-01@ manila- 01: oslo_privsep. daemon. FailedToDropPri vileges: privsep helper command exited non-zero (1) share.manager Traceback (most recent call last): share.manager File "/var/lib/ kolla/venv/ lib/python3. 10/site- packages/ manila/ share/manager. py", line 357, in _driver_setup share.manager self.driver. check_for_ setup_error( ) share.manager File "/var/lib/ kolla/venv/ lib/python3. 10/site- packages/ manila/ share/drivers/ lvm.py" , line 76, in check_for_ setup_error share.manager out, err = privsep_ lvm.list_ vgs_get_ name() share.manager File "/var/lib/ kolla/venv/ lib/python3. 10/site- packages/ oslo_privsep/ priv_context. py", line 269, in _wrap share.manager self.start() share.manager File "/var/lib/ kolla/venv/ lib/python3. 10/site- packages/ oslo_privsep/ priv_context. py", line 283, in start share.manager channel = daemon. RootwrapClientC hannel( context= self) share.manager File "/var/lib/ kolla/venv/ lib/python3. 10/site- packages/ oslo_privsep/ daemon. py", line 358, in __init__ share.manager raise FailedToDropPri vileges( msg)
2024-02-19 04:35:17.474 15 WARNING oslo.privsep.daemon [-] privsep log: sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
2024-02-19 04:35:17.476 15 WARNING oslo.privsep.daemon [-] privsep log: sudo: a password is required
2024-02-19 04:35:17.485 15 CRITICAL oslo.privsep.daemon [None req-d1f86b5f-
2024-02-19 04:35:17.486 15 ERROR manila.
2024-02-19 04:35:17.486 15 ERROR manila.
2024-02-19 04:35:17.486 15 ERROR manila.
2024-02-19 04:35:17.486 15 ERROR manila.
2024-02-19 04:35:17.486 15 ERROR manila.
2024-02-19 04:35:17.486 15 ERROR manila.
2024-02-19 04:35:17.486 15 ERROR manila.
2024-02-19 04:35:17.486 15 ERROR manila.
2024-02-19 04:35:17.486 15 ERROR manila.
2024-02-19 04:35:17.486 15 ERROR manila.
2024-02-19 04:35:17.486 15 ERROR manila.
2024-02-19 04:35:17.486 15 ERROR manila.