icingaweb2-module-businessprocess icon indicating copy to clipboard operation
icingaweb2-module-businessprocess copied to clipboard

Don't allow deletion of referenced processes

Open EmmaTinten opened this issue 3 years ago • 5 comments

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.

EmmaTinten avatar Jun 01 '21 12:06 EmmaTinten

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.

nilmerg avatar Jun 01 '21 14:06 nilmerg

I'll give you a description:

  1. create a business process which contains at least one service
  2. create another business process which only contains the previously created process
  3. check the processes, they will be o.k.
  4. remove the process you created in step 1
  5. 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.

EmmaTinten avatar Jun 01 '21 14:06 EmmaTinten

Still can't reproduce. Performing your steps gives me the following without saving:

Screenshot from 2021-06-02 11-54-53

and this with saving first before I remove "One":

Screenshot from 2021-06-02 11-56-20

Also doing a final save in both situations still keeps the UI working fine.

nilmerg avatar Jun 02 '21 09:06 nilmerg

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?

EmmaTinten avatar Jun 02 '21 10:06 EmmaTinten

Aaaah, a reference between entire configurations, not just between processes. :bulb:

Reproduce it now. Thanks for the clarification.

nilmerg avatar Jun 02 '21 10:06 nilmerg