openstack

package
v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderName            = "openstack"
	ClusterAutoHealingLabel = "auto_healing_enabled"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenStackCloudProvider

type OpenStackCloudProvider struct {
	Nova                 *gophercloud.ServiceClient
	Heat                 *gophercloud.ServiceClient
	Magnum               *gophercloud.ServiceClient
	Config               config.Config
	ResourceStackMapping map[string]ResourceStackRelationship
}

OpenStack is an implementation of cloud provider Interface for OpenStack.

func (OpenStackCloudProvider) Enabled

func (provider OpenStackCloudProvider) Enabled() bool

Enabled decides if the repair should be triggered. There are two conditions that we disable the repair: - The cluster admin disables the auto healing via OpenStack API. - The Magnum cluster is not in stable status.

func (OpenStackCloudProvider) GetName

func (provider OpenStackCloudProvider) GetName() string

func (OpenStackCloudProvider) Repair

func (provider OpenStackCloudProvider) Repair(nodes []healthcheck.NodeInfo) error

Repair soft deletes the VMs, marks the heat resource "unhealthy" then trigger Heat stack update in order to rebuild the VMs. The information this function needs: - Nova VM IDs - Heat stack ID and resource ID.

type ResourceStackRelationship

type ResourceStackRelationship struct {
	ResourceID   string
	ResourceName string
	StackID      string
	StackName    string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL