-
Notifications
You must be signed in to change notification settings - Fork 143
Description
For all services listed in System > Services, we use a default config of null at the exception of the Shellinabox service, which has a pre-set default config. This is defined at:
rockstor-core/src/rockstor/scripts/prep_db.py
Lines 45 to 51 in b870fa2
| # N.B. all other services have null as their default config with service. | |
| # Consider bringing shellinaboxd in line with this now default behaviour. | |
| services_configs = { | |
| "shellinaboxd": ( | |
| '{"detach": false, "css": "white-on-black", ' '"shelltype": "LOGIN"}' | |
| ) | |
| } |
As mentioned in that snippet, we should consider moving this default config to null, in line with all other services. This would in turn greatly help with our handling of system services as we currently find ourselves needing to set an exception for the shellinabox service every time we work on services configurations.
Incidentally, since @phillxnet's rework of our database instantiation mechanisms (#2729/#2733), Bug 2 detailed in #2723 (comment) now applies to the Shellinabox service, which results in an empty config for that service as well after initial database setup.
systemctl stop rockstor rockstor-bootstrap
rm .initrock # so that existing data is wiped upon first run of initrock
poetry run initrock
The Shellinabox service now has no default config defined:
buildvm155:/opt/rockstor # poetry run psql -U rocky -d smartdb -c "SELECT * FROM smart_manager_service WHERE name = 'shellinaboxd';"
Password for user rocky:
id | name | display_name | config
----+--------------+----------------+--------
15 | shellinaboxd | Shell In A Box |
(1 row)
In such a situation, there does not appear to be any negative consequence as the Shellinabox service:
- can still be configured as normal
- can still be started as normal
This thus seems to support the fact that we can simply remove our mechanisms that enforce a default config for that service but I would still need to verify that further as I'm not sure why we have such mechanisms in the first place.