icingaweb2-module-businessprocess
icingaweb2-module-businessprocess copied to clipboard
Don't allow deletion of referenced processes
Deleting a process which is an element of another process should not be possible. If this happens the Web UI is no more usable, someone must create the empty process.
Version is 2.3.0 of businessprocess.
Just tried this myself using the current master and I can't reproduce that. No matter which one of the two removal types I choose, the config is correctly updated and there's no trace left of the process I remove.
Please provide a detailed step by step instruction how you can reproduce that.
I'll give you a description:
- create a business process which contains at least one service
- create another business process which only contains the previously created process
- check the processes, they will be o.k.
- remove the process you created in step 1
- try to access the ui
Editing the config files below works or just restoring the previously deleted. I expect a check prior deleting something that this is not in use by other processes.
Still can't reproduce. Performing your steps gives me the following without saving:
and this with saving first before I remove "One":
Also doing a final save in both situations still keeps the UI working fine.
test.conf out of /etc/icingaweb2/modules/businessprocess/processes/
### Business Process Config File ###
#
# Owner : icingaadmin
# AddToMenu : yes
# Statetype : soft
#
###################################
testnode = icinga-master.vrc.lan;http
display 1;testnode;testnode
testdep.conf, secondary defintion:
### Business Process Config File ###
#
# Owner : icingaadmin
# AddToMenu : yes
# Statetype : soft
#
###################################
testdepnode = @test:testnode
display 1;testdepnode;testdepnode
There must be two processes, one including the other. When this is configured, remove the included process (in the above config, remove the process 'test'.
Is this sufficient?
Aaaah, a reference between entire configurations, not just between processes. :bulb:
Reproduce it now. Thanks for the clarification.