Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: host groups - honour HA groups #65

Open
antitbone opened this issue Aug 27, 2024 · 7 comments
Open

Feature: host groups - honour HA groups #65

antitbone opened this issue Aug 27, 2024 · 7 comments
Assignees
Labels
feature question Further information is requested
Milestone

Comments

@antitbone
Copy link

Hello

Is it planned to implement cluster management on multiple computer rooms?

It would be interesting to be able to define host groups and limit the migration of VMs to host groups.
This will allow the distribution of vms over several computer rooms so that the hosted services can withstand the loss of a room.
And have a degraded mode in which host groups are not respected if one of the host groups is not available.

Example with a ceph stretch cluster on Two computer rooms + a witness. Only the compute is to be migrated
If the cluster is correctly sized it is possible to survive the loss of a computer room.

Antoine

@gyptazy
Copy link
Owner

gyptazy commented Aug 27, 2024

Hey @antitbone,

thanks for your input. When I initially integrated the affinity / anti-affinity rules I also thought about something like that. However, it's not really possible to do it in a user friendly way. While we have tags for VMs, we only have notes fields for nodes. This means, this could be abused in a dirty way, or something like an additional matrix in YAML or JSON could be provided which might look like:

group1:
  nodes:
    - node01
    - node02
    - node03
  vms:
    - vm01
    - vm02
    - vm03
group2:
  nodes:
    - node04
    - node05
    - node06
  vms:
    - vm04
    - vm05
    - vm06

or

{
  "group1": {
    "nodes": [
      "node01",
      "node02",
      "node03"
    ],
    "vms": [
      "vm01",
      "vm02",
      "vm03"
    ]
  },
  "group2": {
    "nodes": [
      "node04",
      "node05",
      "node06"
    ],
    "vms": [
      "vm04",
      "vm05",
      "vm06"
    ]
  }
}

So, from a technical perspective this isn't difficult but I'm not sure which way could be the best one for a user to provide the information / matrix. Happy to hear feedback!

Cheers,
gyptazy

@gyptazy gyptazy added the question Further information is requested label Aug 27, 2024
@gyptazy gyptazy self-assigned this Aug 27, 2024
@antitbone
Copy link
Author

It does not seem possible to have tags at the host level in proxmox.
Host groups in an external file make sense.
Especially since the topology of the hosts moves little in time.

group1:
  nodes:
    - node01
    - node02
    - node03
group2:
  nodes:
    - node04
    - node05
    - node06

But the assignment of vm to a group could be done by a tag.
ex: pbl_group-preferred_group1, pbl_group-exclusive_group1

Antoine

@gyptazy
Copy link
Owner

gyptazy commented Aug 28, 2024

Hey Antonie,

right, but this is already included in Proxmox: https://github.com/gyptazy/ProxLB?tab=readme-ov-file#affinity-stay-together

However, this only keeps the VMs together but does not have any correlation to the nodes on this level. So they might still be moved to completely different "rooms" or "places.

Cheers,
gyptazy

@antitbone
Copy link
Author

Do the currently possible tags respect ha groups?

Antoine

@gyptazy
Copy link
Owner

gyptazy commented Aug 28, 2024

Do the currently possible tags respect ha groups?

No, they don't do it yet.

@antitbone
Copy link
Author

This would solve the problem of placing VMs on a stretched cluster.

@gyptazy gyptazy changed the title Feature: host groups Feature: host groups - honour HA groups Aug 28, 2024
@cobyteskb
Copy link

+1
I like to use this to pin Windows vms to specific hosts due to licensing (we license physical hosts) with HA-rules, and then use the tag exclude rules to make sure they are not running on the same host.

@gyptazy gyptazy added this to the Release 1.0.4 milestone Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants