Hello,
we would like to make some improvements of the roles contained in the
linux-syste-roles project (https://github.com/linux-system-roles) and
we would like feedback on the design / user interface choices.
The issues we are not sure about are:
- state attribute. The network role
(https://github.com/linux-system-roles/network), which manages network
connections e.g. of NetworkManager, uses a state attribute for every
connection. We found that the current four states (present, absent, up,
down) partially overlap and are quite ill-defined. We want to split them
into two state variables, one for the presence of the profile
configuration, the other for the runtime state. They would be called
persistent_state: present/absent
state: up/down
This would satisfy our needs but we are thinking that having two state
attributes of an object might be quite unexpected. Is there some prior
art for this or a better way to handle it?
- Respecting previous configuration. The selinux role
(https://github.com/linux-system-roles/selinux/), if selinux_mode is
not given, would leave the selinux mode at the previous value. This is
the safe option (changing selinux mode has te potential of braking a
machine or make it insecure), but makes the result dependent on the
previous configuration. Does it make sense? Also, we have been
discussing whether local modifications to the selinux booleans, file
contexts etc. should be dropped before the role sets the desired value.
The reasoning for not dropping them is that then the role can not be
used twice to configure different (non-overlapping) selinux values,
because the second run would clobber the first. Also, clobbering the
previous state could be quite unexpected and potentially dangerous. But
not doing it has the possible disadvantage of not defining the state
completely.
Relevant discussion: https://bugzilla.redhat.com/show_bug.cgi?id=1597545
Advice from more experienced role developers would be welcome.
Best regards, Pavel