opensecuritycontroller / osc-core

A software-defined security orchestration solution
https://www.opensecuritycontroller.org/
Apache License 2.0
43 stars 29 forks source link

While a Security Group is binded, removing original members results in an exception. #634

Open dmitryintel opened 6 years ago

dmitryintel commented 6 years ago

Description

While major issues deleting bound ("binded") security groups have been fixed, certain intricate steps still produce exceptions. They are not referential integrity exceptions, as was the case with #627.

For example, if you remove all the members from a SecurityGroup (from the Console) or remove all the existing members and adding some new ones in a single edit, the edit fails.

Expected Behavior

Should be able to edit SG members while bound.

Actual Behavior

See Steps toReproduce.

Steps to Reproduce

You will need an openstack environment with two or three Virtual Machines (VM's).

Additional Information

Workaround

Once you have tried the steps above and the operation failed, you can unbind the security group and bind it again. That brings it to a consistent state.

Similar issues:

#627 and (possibly) #528.

Stack trace:

2018-01-09 21:47:33,533 [WARN | isc-task-pool-20| o.o.c.b.j.TaskNode]: Task TaskNode [task=[null], state=RUNNING, status=PASSED, guard=ALL_PREDECESSORS_SUCCEE DED] Failed org.osc.core.broker.service.exceptions.VmidcBrokerValidationException: Open Security Controller: An inspection hook was found in the SDN controller but a DAI was not found assigned to the SGI DA01_13. at org.osc.core.broker.service.tasks.conformance.openstack.securitygroup.CheckPortGroupHookMetaTask.executeTransaction(CheckPortGroupHookMetaTask.java :127) at org.osc.core.broker.service.tasks.TransactionalMetaTask.lambda$execute$0(TransactionalMetaTask.java:51) at org.apache.aries.tx.control.service.common.impl.AbstractTransactionControlImpl$TransactionBuilderImpl.doWork(AbstractTransactionControlImpl.java:16 1) at org.apache.aries.tx.control.service.common.impl.AbstractTransactionControlImpl$TransactionBuilderImpl.required(AbstractTransactionControlImpl.java: 84) at org.apache.aries.tx.control.service.common.impl.AbstractTransactionControlImpl.required(AbstractTransactionControlImpl.java:263) at org.osc.core.broker.service.tasks.TransactionalMetaTask.execute(TransactionalMetaTask.java:50) at org.osc.core.broker.job.TaskNode.run(TaskNode.java:317) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748)

Environment

Status

sudhirappaji commented 6 years ago

@dmitryintel , please investigate.