Unable to create a Vm group with Role affinity constraints.

Objective:
To create VM Group with Role affinity as Affined for A,B and Anti-Affined for B,C

Current results: VM Group is not getting created showing the below error.

Expected results: VM Group should get created.

Versions of the related components and OS (frontend, hypervisors, VMs):
OpenNebula 6.0.0.2
Frontend OS: Ubuntu20.04
Hosts: CentOS 7.9