Skip to content

Cleanup will delete computer accounts of VMs that move between zones #38

Description

@idofl

If a user moves a vm between zones without re-joining the VM (such as when using regional OS disks), the cleanup process will remove the computer account.

If the VM does not rejoin, the VM attributes in AD won't get updated and will have the value of the old zone. In the cleanup, in:
elif gcp.project.Project(computer.get_project_id()).get_instance(computer.get_instance_name(), computer.get_zone()):

The VM will not be found in the old zone, and the code will attempt to remove the computer account.

Is there a way to search for a VM in a project, regardless of its zone?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions