Documentation ¶
Index ¶
- Constants
- Variables
- func Add(mgr manager.Manager) error
- func MergeProfiles(a, b *starlingxv1.HostProfileSpec) (*starlingxv1.HostProfileSpec, error)
- func NewClusterDeploymentModelMonitor(instance *starlingxv1.Host, clusterId string) *manager.Monitor
- func NewClusterPresenceMonitor(instance *starlingxv1.Host, cluster string) *manager.Monitor
- func NewDynamicHostMonitor(instance *starlingxv1.Host, hostname string, match *starlingxv1.MatchInfo, ...) *manager.Monitor
- func NewEnabledControllerNodeMonitor(instance *starlingxv1.Host, required int) *manager.Monitor
- func NewInventoryCollectedMonitor(instance *starlingxv1.Host, id string) *manager.Monitor
- func NewKubernetesResourceMonitor(instance *starlingxv1.Host, target runtime.Object, name types.NamespacedName) *manager.Monitor
- func NewKubernetesSecretMonitor(instance *starlingxv1.Host, name types.NamespacedName) *manager.Monitor
- func NewLockedDisabledHostMonitor(instance *starlingxv1.Host, id string) *manager.Monitor
- func NewPartitionStateMonitor(instance *starlingxv1.Host, id string) *manager.Monitor
- func NewProvisioningAllowedMonitor(instance *starlingxv1.Host) *manager.Monitor
- func NewStableHostMonitor(instance *starlingxv1.Host, id string) *manager.Monitor
- func NewStateChangeMonitor(instance *starlingxv1.Host, id string) *manager.Monitor
- func NewStateMonitor(instance *starlingxv1.Host, id string, admin, oper, avail *string) *manager.Monitor
- func NewStorageMonitorCountMonitor(instance *starlingxv1.Host, required int) *manager.Monitor
- func NewStorageTierMonitor(instance *starlingxv1.Host, clusterID, tierName string) *manager.Monitor
- func NewUnlockedAvailableHostMonitor(instance *starlingxv1.Host, id string) *manager.Monitor
- func NewUnlockedEnabledHostMonitor(instance *starlingxv1.Host, id string) *manager.Monitor
- type ReconcileHost
- func (r *ReconcileHost) AllControllerNodesEnabled(required int) bool
- func (r *ReconcileHost) BuildCompositeProfile(host *starlingxv1.Host) (*starlingxv1.HostProfileSpec, error)
- func (r *ReconcileHost) BuildHostDefaults(instance *starlingxv1.Host, host v1info.HostInfo) (*starlingxv1.HostProfileSpec, error)
- func (r *ReconcileHost) CompareAttributes(in *starlingxv1.HostProfileSpec, other *starlingxv1.HostProfileSpec, ...) bool
- func (r *ReconcileHost) CompareDisabledAttributes(in *starlingxv1.HostProfileSpec, other *starlingxv1.HostProfileSpec, ...) bool
- func (r *ReconcileHost) CompareEnabledAttributes(in *starlingxv1.HostProfileSpec, other *starlingxv1.HostProfileSpec, ...) bool
- func (r *ReconcileHost) CompareOSDs(in *starlingxv1.HostProfileSpec, other *starlingxv1.HostProfileSpec) bool
- func (r *ReconcileHost) DeleteHostProfile(namespace, profile string) error
- func (r *ReconcileHost) GetHostDefaults(instance *starlingxv1.Host) (*starlingxv1.HostProfileSpec, error)
- func (r *ReconcileHost) GetHostProfile(namespace, profile string) (*starlingxv1.HostProfileSpec, error)
- func (r *ReconcileHost) HTTPSRequired() bool
- func (r *ReconcileHost) MonitorsEnabled(required int) bool
- func (r *ReconcileHost) OSDProvisioningAllowed(instance *starlingxv1.Host, osdInfo starlingxv1.OSDInfo, tierUUID *string, ...) error
- func (r *ReconcileHost) OSDProvisioningState(namespace string, personality string) RequiredState
- func (r *ReconcileHost) ProvisioningAllowed() bool
- func (r *ReconcileHost) Reconcile(request reconcile.Request) (result reconcile.Result, err error)
- func (r *ReconcileHost) ReconcileAddresses(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileAttributes(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileBondInterfaces(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) (err error)
- func (r *ReconcileHost) ReconcileDeletedHost(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) (err error)
- func (r *ReconcileHost) ReconcileDisabledHost(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileEnabledHost(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileEthernetInterfaces(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileExistingHost(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileFileSystems(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileFinalState(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileHostByState(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileInitialState(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileInterfaceDataNetworks(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) (updated bool, err error)
- func (r *ReconcileHost) ReconcileInterfaceNetworks(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) (updated bool, err error)
- func (r *ReconcileHost) ReconcileLabels(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileMemory(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileMonitor(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileNetworking(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileNewHost(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) (host *hosts.Host, err error)
- func (r *ReconcileHost) ReconcileOSDs(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileOSDsByType(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcilePartitions(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcilePhysicalVolumes(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcilePowerState(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileProcessors(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileResource(client *gophercloud.ServiceClient, instance *starlingxv1.Host) (err error)
- func (r *ReconcileHost) ReconcileRoutes(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileSRIOVInterfaces(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileStaleAddresses(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileStaleInterfaceDataNetworks(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileStaleInterfaceNetworks(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileStaleInterfaces(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileStaleOSDs(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileStaleRoutes(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileStorage(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) ReconcileVFInterfaces(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) (err error)
- func (r *ReconcileHost) ReconcileVLANInterfaces(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) (err error)
- func (r *ReconcileHost) ReconcileVolumeGroups(client *gophercloud.ServiceClient, instance *starlingxv1.Host, ...) error
- func (r *ReconcileHost) StopAfterInSync() bool
- func (r *ReconcileHost) UpdateRequired(instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, ...) (opts hosts.HostOpts, result bool, err error)
- func (r *ReconcileHost) ValidateProfile(host *starlingxv1.Host, profile *starlingxv1.HostProfileSpec) error
- type RequiredState
Constants ¶
const ControllerName = "host-controller"
const DefaultClusterDeploymentModelMonitorInterval = 30 * time.Second
DefaultClusterDeploymentModelMonitorInterval represents the default interval between polling attempts to check whether the deployment model has been set on a cluster. The deployment model requires multiple hosts to be enabled therefore there is no point in polling frequently as other hosts need to boot, install, and be configured.
const DefaultClusterPresenceMonitorInterval = 2 * time.Minute
DefaultPartitionMonitorInterval represents the default interval between polling attempts to check whether a cluster exists or not. A user may need to intervene to create a cluster so set this to a value long enough to avoid unnecessary polling of the API.
const DefaultDynamicHostMonitorInterval = 30 * time.Second
DefaultDynamicHostMonitorInterval represents the default interval between polling attempts to check whether a host has appeared in system inventory.
const DefaultEnabledControllerNodeMonitorInterval = 30 * time.Second
DefaultEnabledControllerNodeMonitorInterval represents the default interval between polling attempts to check whether all controller nodes have reached the unlocked/enabled state.
const DefaultInventoryCollectedMonitorInterval = 30 * time.Second
DefaultInventoryCollectedMonitorInterval represents the default interval between polling attempts to check whether a host has reached the desired state before beginning to collect default values.
const DefaultKubernetesResourceMonitorInterval = 30 * time.Second
DefaultKubernetesResourceMonitorInterval represents the default interval between polling attempts to check whether a kubernetes resource is present.
const DefaultMonitorCountMonitorInterval = 30 * time.Second
DefaultMonitorCountMonitorInterval represents the default interval between polling attempts to check whether sufficient storage monitors are enabled prior to enabling other hosts or creating OSDs.
const DefaultPartitionMonitorInterval = 15 * time.Second
DefaultPartitionMonitorInterval represents the default interval between polling attempts to check disk partition states on a host. Partitions do not usually take much time to be ready so this interval is kept short.
const DefaultProvisioningAllowedMonitorInterval = 30 * time.Second
DefaultProvisioningAllowedMonitorInterval represents the default interval between polling attempts to check whether host provisioning is allowed based on the state of the primary controller.
const DefaultStableHostMonitorInterval = 30 * time.Second
DefaultStableHostMonitorInterval represents the default interval between polling attempts to check whether a host has reached a stable state.
const DefaultStateChangeMonitorInterval = 2 * time.Minute
DefaultStateChangeMonitorInterval represents the default interval between polling attempts to check whether a host has change state.
const DefaultStateMonitorInterval = 30 * time.Second
DefaultStateMonitorInterval represents the default interval between polling attempts to check whether a host has reached the desired state.
const DefaultStorageTierMonitorInterval = 30 * time.Second
DefaultStorageTierMonitorInterval represents the default interval between polling attempts to check whether the specified storage tier has been created.
const FinalizerName = "host.finalizers.windriver.com"
const MinimumEnabledControllerNodesForNonController = 2
MinimumEnabledControllerNodesForNonController defines the minimum acceptable number of controller nodes that must be enable prior to unlocking a non- controller node.
Variables ¶
var AdminLocked = hosts.AdminLocked
DefaultHostProfile contains mandatory default values for a host profile. This is intentionally sparsely populated because the system API defaults are preferred for any attributes not specified by the user. Only attributes that are absolutely required for the proper functioning of this controller should be specified here.
var DefaultHostProfile = starlingxv1.HostProfileSpec{ ProfileBaseAttributes: starlingxv1.ProfileBaseAttributes{ AdministrativeState: &AdminLocked, ProvisioningMode: &DynamicProvisioningMode, }, }
var DynamicProvisioningMode = starlingxv1.ProvioningModeDynamic
Functions ¶
func Add ¶
Add creates a new Host Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.
func MergeProfiles ¶
func MergeProfiles(a, b *starlingxv1.HostProfileSpec) (*starlingxv1.HostProfileSpec, error)
MergeProfiles invokes the mergo.Merge API with our desired modifiers.
func NewClusterDeploymentModelMonitor ¶ added in v1.0.0
func NewClusterDeploymentModelMonitor(instance *starlingxv1.Host, clusterId string) *manager.Monitor
NewClusterDeploymentModelMonitor defines a convenience function to instantiate a new cluster deployment model monitor.
func NewClusterPresenceMonitor ¶ added in v1.0.0
func NewClusterPresenceMonitor(instance *starlingxv1.Host, cluster string) *manager.Monitor
NewClusterPresenceMonitor defines a convenience function to instantiate a new cluster presence monitor with all required attributes.
func NewDynamicHostMonitor ¶ added in v1.0.0
func NewDynamicHostMonitor(instance *starlingxv1.Host, hostname string, match *starlingxv1.MatchInfo, bootMAC *string) *manager.Monitor
NewDynamicHostMonitor defines a convenience function to instantiate a new kubernetes resource monitor with all required attributes.
func NewEnabledControllerNodeMonitor ¶ added in v1.0.0
func NewEnabledControllerNodeMonitor(instance *starlingxv1.Host, required int) *manager.Monitor
NewEnabledControllerNodeMonitor defines a convenience function to instantiate a new enabled controller monitor with all required attributes.
func NewInventoryCollectedMonitor ¶ added in v1.0.0
func NewInventoryCollectedMonitor(instance *starlingxv1.Host, id string) *manager.Monitor
NewInventoryCollectedMonitor defines a convenience function to instantiate a new inventory collected monitor with all required attributes.
func NewKubernetesResourceMonitor ¶ added in v1.0.0
func NewKubernetesResourceMonitor(instance *starlingxv1.Host, target runtime.Object, name types.NamespacedName) *manager.Monitor
NewKubernetesResourceMonitor defines a convenience function to instantiate a new kubernetes resource monitor with all required attributes.
func NewKubernetesSecretMonitor ¶ added in v1.0.0
func NewKubernetesSecretMonitor(instance *starlingxv1.Host, name types.NamespacedName) *manager.Monitor
NewKubernetesSecretMonitor is a convenience wrapper around NewKubernetesResourceMonitor that instantiates a monitor explicitly for Kubernetes Secret resources.
func NewLockedDisabledHostMonitor ¶ added in v1.0.0
func NewLockedDisabledHostMonitor(instance *starlingxv1.Host, id string) *manager.Monitor
NewLockedDisabledHostMonitor is a convenience wrapper around NewStateMonitor to wait for a host to reach the locked/disabled state.
func NewPartitionStateMonitor ¶ added in v1.0.0
func NewPartitionStateMonitor(instance *starlingxv1.Host, id string) *manager.Monitor
NewPartitionStateMonitor defines a convenience function to instantiate a new partition monitor with all required attributes.
func NewProvisioningAllowedMonitor ¶ added in v1.0.0
func NewProvisioningAllowedMonitor(instance *starlingxv1.Host) *manager.Monitor
NewProvisioningAllowedMonitor defines a convenience function to instantiate a new provisioning allowed monitor with all required attributes.
func NewStableHostMonitor ¶
func NewStableHostMonitor(instance *starlingxv1.Host, id string) *manager.Monitor
NewStableHostMonitor defines a convenience function to instantiate a new stable host monitor with all required attributes.
func NewStateChangeMonitor ¶ added in v1.0.0
func NewStateChangeMonitor(instance *starlingxv1.Host, id string) *manager.Monitor
NewMonitorCountMonitor defines a convenience function to instantiate a new host state monitor with all required attributes.
func NewStateMonitor ¶ added in v1.0.0
func NewStateMonitor(instance *starlingxv1.Host, id string, admin, oper, avail *string) *manager.Monitor
NewMonitorCountMonitor defines a convenience function to instantiate a new host state monitor with all required attributes.
func NewStorageMonitorCountMonitor ¶ added in v1.0.0
func NewStorageMonitorCountMonitor(instance *starlingxv1.Host, required int) *manager.Monitor
NewMonitorCountMonitor defines a convenience function to instantiate a new storage monitor count monitor with all required attributes.
func NewStorageTierMonitor ¶ added in v1.0.0
func NewStorageTierMonitor(instance *starlingxv1.Host, clusterID, tierName string) *manager.Monitor
NewStorageTierMonitor defines a convenience function to instantiate a new storage monitor count monitor with all required attributes.
func NewUnlockedAvailableHostMonitor ¶ added in v1.0.0
func NewUnlockedAvailableHostMonitor(instance *starlingxv1.Host, id string) *manager.Monitor
NewUnlockedAvailableHostMonitor is a convenience wrapper around NewStateMonitor to wait for a host to reach the unlocked/enabled/available state.
func NewUnlockedEnabledHostMonitor ¶ added in v1.0.0
func NewUnlockedEnabledHostMonitor(instance *starlingxv1.Host, id string) *manager.Monitor
NewUnlockedEnabledHostMonitor is a convenience wrapper around NewStateMonitor to wait for a host to reach the unlocked/enabled state.
Types ¶
type ReconcileHost ¶
type ReconcileHost struct { client.Client cloudManager.CloudManager common.ReconcilerErrorHandler common.ReconcilerEventLogger // contains filtered or unexported fields }
ReconcileHostByState reconciles a Host object
func (*ReconcileHost) AllControllerNodesEnabled ¶
func (r *ReconcileHost) AllControllerNodesEnabled(required int) bool
AllControllerNodesEnabled determines whether the system is ready for additional nodes to be unlocked. To avoid issues with provisioning storage resources we need to wait for both controllers to be unlocked/enabled.
func (*ReconcileHost) BuildCompositeProfile ¶
func (r *ReconcileHost) BuildCompositeProfile(host *starlingxv1.Host) (*starlingxv1.HostProfileSpec, error)
BuildCompositeProfile combines the default profile, the profile inheritance chain, and host specific overrides to form a final composite profile that will be applied to the host at configuration time.
func (*ReconcileHost) BuildHostDefaults ¶
func (r *ReconcileHost) BuildHostDefaults(instance *starlingxv1.Host, host v1info.HostInfo) (*starlingxv1.HostProfileSpec, error)
BuildHostDefaults takes the current set of host attributes and builds a fake host profile that can be used as a reference for the current settings applied to the host. The default settings are saved on the host status.
func (*ReconcileHost) CompareAttributes ¶
func (r *ReconcileHost) CompareAttributes(in *starlingxv1.HostProfileSpec, other *starlingxv1.HostProfileSpec, namespace, personality string) bool
CompareAttributes determines if two profiles are identical for the purpose of reconciling a current host configuration to its desired host profile.
func (*ReconcileHost) CompareDisabledAttributes ¶
func (r *ReconcileHost) CompareDisabledAttributes(in *starlingxv1.HostProfileSpec, other *starlingxv1.HostProfileSpec, namespace, personality string) bool
CompareEnabledAttributes determines if two profiles are identical for the purpose of reconciling any attributes that can only be applied when the host is enabled.
func (*ReconcileHost) CompareEnabledAttributes ¶
func (r *ReconcileHost) CompareEnabledAttributes(in *starlingxv1.HostProfileSpec, other *starlingxv1.HostProfileSpec, namespace, personality string) bool
CompareEnabledAttributes determines if two profiles are identical for the purpose of reconciling any attributes that can only be applied when the host is enabled. The only attributes that we can reconcile while enabled are the storage OSD resources therefore return false if there are any differences in the storage OSD list.
func (*ReconcileHost) CompareOSDs ¶
func (r *ReconcileHost) CompareOSDs(in *starlingxv1.HostProfileSpec, other *starlingxv1.HostProfileSpec) bool
CompareOSDs determine if there has been a change to the list of OSDs between two profile specs. This method takes into consideration that the storage section may be completely empty on either side of the comparison.
func (*ReconcileHost) DeleteHostProfile ¶
func (r *ReconcileHost) DeleteHostProfile(namespace, profile string) error
DeleteHostProfile deletes a HostProfile from the kubernetes API
func (*ReconcileHost) GetHostDefaults ¶
func (r *ReconcileHost) GetHostDefaults(instance *starlingxv1.Host) (*starlingxv1.HostProfileSpec, error)
GetHostDefaults retrieves the default attributes for a host. The set of default attributes are collected from the host before any user configurations are applied.
func (*ReconcileHost) GetHostProfile ¶
func (r *ReconcileHost) GetHostProfile(namespace, profile string) (*starlingxv1.HostProfileSpec, error)
GetHostProfile retrieves a HostProfileSpec from the kubernetes API
func (*ReconcileHost) HTTPSRequired ¶
func (r *ReconcileHost) HTTPSRequired() bool
HTTPSRequired determines whether an HTTPS connection is required for the purpose of configuring host BMC attributes.
func (*ReconcileHost) MonitorsEnabled ¶
func (r *ReconcileHost) MonitorsEnabled(required int) bool
MonitorsEnabled determines whether the required number of monitors are enabled or not. Provisioning certain storage resources requires that a certain number of monitors be enabled.
func (*ReconcileHost) OSDProvisioningAllowed ¶
func (r *ReconcileHost) OSDProvisioningAllowed(instance *starlingxv1.Host, osdInfo starlingxv1.OSDInfo, tierUUID *string, host *v1info.HostInfo) error
OSDProvisioningAllowed is a utility function which determines whether OSD provisioning is allowed based on the node type, the current cluster deployment model, and the current state of the controllers.
func (*ReconcileHost) OSDProvisioningState ¶
func (r *ReconcileHost) OSDProvisioningState(namespace string, personality string) RequiredState
OSDProvisioningState determines at what time the system permits OSD resources to be added to a host.
func (*ReconcileHost) ProvisioningAllowed ¶
func (r *ReconcileHost) ProvisioningAllowed() bool
ProvisioningAllowed determines whether the system will allow creating or configuring new hosts. The primary controller must be enabled for these actions to be allowed.
func (*ReconcileHost) Reconcile ¶
Reconcile reads that state of the cluster for a Host object and makes changes based on the state read and what is in the Host.Spec +kubebuilder:rbac:groups="",resources=events,verbs=create;patch +kubebuilder:rbac:groups=starlingx.windriver.com,resources=hosts,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=starlingx.windriver.com,resources=hosts/status,verbs=get;update;patch
func (*ReconcileHost) ReconcileAddresses ¶
func (r *ReconcileHost) ReconcileAddresses(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
func (*ReconcileHost) ReconcileAttributes ¶
func (r *ReconcileHost) ReconcileAttributes(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *hosts.Host) error
ReconcileAttributes is responsible for reconciling the basic attributes for a host resource.
func (*ReconcileHost) ReconcileBondInterfaces ¶
func (r *ReconcileHost) ReconcileBondInterfaces(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) (err error)
func (*ReconcileHost) ReconcileDeletedHost ¶
func (r *ReconcileHost) ReconcileDeletedHost(client *gophercloud.ServiceClient, instance *starlingxv1.Host, host *hosts.Host) (err error)
ReconcileExistingHost is responsible for dealing with the provisioning of an existing host.
func (*ReconcileHost) ReconcileDisabledHost ¶
func (r *ReconcileHost) ReconcileDisabledHost(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileHostByState is responsible for reconciling each individual sub-domain of a host resource.
func (*ReconcileHost) ReconcileEnabledHost ¶
func (r *ReconcileHost) ReconcileEnabledHost(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
func (*ReconcileHost) ReconcileEthernetInterfaces ¶
func (r *ReconcileHost) ReconcileEthernetInterfaces(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileEthernetInterfaces will update system interfaces to align with the desired configuration. It is assumed that the configuration will apply; meaning that prior to invoking this function stale interfaces and stale interface configurations have been resolved so that the intended list of ethernet interface configuration will apply cleanly here.
func (*ReconcileHost) ReconcileExistingHost ¶
func (r *ReconcileHost) ReconcileExistingHost(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *hosts.Host) error
ReconcileExistingHost is responsible for dealing with the provisioning of an existing host.
func (*ReconcileHost) ReconcileFileSystems ¶ added in v1.0.0
func (r *ReconcileHost) ReconcileFileSystems(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileFileSystems is responsible for reconciling the storage file system configuration of a host resource.
func (*ReconcileHost) ReconcileFinalState ¶
func (r *ReconcileHost) ReconcileFinalState(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileFinalState is intended to be run as the last step. Once all configuration changes have been applied it is safe to change the state of the host if the desired state is different than the current state.
func (*ReconcileHost) ReconcileHostByState ¶
func (r *ReconcileHost) ReconcileHostByState(client *gophercloud.ServiceClient, instance *starlingxv1.Host, current *starlingxv1.HostProfileSpec, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileHostByState is responsible for differentiating between an enabled host and a disabled host. Most attributes only support being updated when the host is in a certain state therefore those differences are discriminated here.
func (*ReconcileHost) ReconcileInitialState ¶
func (r *ReconcileHost) ReconcileInitialState(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileInitialState is intended to be run before any other changes are reconciled on the host. Its purpose is to set the administrative state to Locked if that is the intended state. Attribute changes may require this and if the operator knows this then they may have set the state to Locked in order to change certain attributes.
func (*ReconcileHost) ReconcileInterfaceDataNetworks ¶ added in v1.0.0
func (r *ReconcileHost) ReconcileInterfaceDataNetworks(client *gophercloud.ServiceClient, instance *starlingxv1.Host, info starlingxv1.CommonInterfaceInfo, iface interfaces.Interface, host *v1info.HostInfo) (updated bool, err error)
ReconcileInterfaceDataNetworks implements a method to reconcile the list of networks on an interface against the configured set of networks.
func (*ReconcileHost) ReconcileInterfaceNetworks ¶ added in v1.0.0
func (r *ReconcileHost) ReconcileInterfaceNetworks(client *gophercloud.ServiceClient, instance *starlingxv1.Host, info starlingxv1.CommonInterfaceInfo, iface interfaces.Interface, host *v1info.HostInfo) (updated bool, err error)
ReconcileInterfaceNetworks implements a method to reconcile the list of networks on an interface against the configured set of networks.
func (*ReconcileHost) ReconcileLabels ¶
func (r *ReconcileHost) ReconcileLabels(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileAttributes is responsible for reconciling the labels on each host.
func (*ReconcileHost) ReconcileMemory ¶
func (r *ReconcileHost) ReconcileMemory(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileMemory is responsible for reconciling the Memory configuration of a host resource.
func (*ReconcileHost) ReconcileMonitor ¶
func (r *ReconcileHost) ReconcileMonitor(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileMonitor is responsible for reconciling the Ceph storage monitor configuration of a compute host resource.
func (*ReconcileHost) ReconcileNetworking ¶
func (r *ReconcileHost) ReconcileNetworking(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileNetworking is responsible for reconciling the Memory configuration of a host resource.
func (*ReconcileHost) ReconcileNewHost ¶
func (r *ReconcileHost) ReconcileNewHost(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec) (host *hosts.Host, err error)
ReconcileNewHost is responsible for dealing with the initial provisioning of a host. This handles both static and dynamic provisioning of hosts. If a new host is created then the 'host' return parameter will be updated with a pointer to the new host object.
func (*ReconcileHost) ReconcileOSDs ¶
func (r *ReconcileHost) ReconcileOSDs(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileOSDs is responsible for reconciling the storage OSD configuration of a host resource.
func (*ReconcileHost) ReconcileOSDsByType ¶
func (r *ReconcileHost) ReconcileOSDsByType(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo, function string) error
ReconcileOSDsByType is responsible for reconciling the storage OSD configuration of a host resource for a specific type of OSD function.
func (*ReconcileHost) ReconcilePartitions ¶
func (r *ReconcileHost) ReconcilePartitions(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo, group starlingxv1.VolumeGroupInfo) error
ReconcileMonitor is responsible for reconciling the disk partitions configuration on a host.
func (*ReconcileHost) ReconcilePhysicalVolumes ¶
func (r *ReconcileHost) ReconcilePhysicalVolumes(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo, group starlingxv1.VolumeGroupInfo) error
ReconcilePhysicalVolumes is responsible for reconciling the physical volume configuration on a host.
func (*ReconcileHost) ReconcilePowerState ¶
func (r *ReconcileHost) ReconcilePowerState(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileInitialState is intended to be run before any other changes are reconciled on the host. Its purpose is to set the administrative state to Locked if that is the intended state. Attribute changes may require this and if the operator knows this then they may have set the state to Locked in order to change certain attributes.
func (*ReconcileHost) ReconcileProcessors ¶
func (r *ReconcileHost) ReconcileProcessors(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileProcessors is responsible for reconciling the CPU configuration of a host resource.
func (*ReconcileHost) ReconcileResource ¶
func (r *ReconcileHost) ReconcileResource(client *gophercloud.ServiceClient, instance *starlingxv1.Host) (err error)
ReconcileResource interacts with the system API in order to reconcile the state of a data network with the state stored in the k8s database.
func (*ReconcileHost) ReconcileRoutes ¶
func (r *ReconcileHost) ReconcileRoutes(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
func (*ReconcileHost) ReconcileSRIOVInterfaces ¶
func (r *ReconcileHost) ReconcileSRIOVInterfaces(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileSRIOVInterfaces will update system interfaces to align with the desired configuration. It is assumed that the configuration will apply; meaning that prior to invoking this function stale interfaces and stale interface configurations have been resolved so that the intended list of ethernet interface configuration will apply cleanly here.
func (*ReconcileHost) ReconcileStaleAddresses ¶
func (r *ReconcileHost) ReconcileStaleAddresses(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileStaleAddresses examines the current set of addresses and deletes any addresses that are stale or need to be re-provisioned. An address needs to be deleted if:
A) The system address does not have an equivalent configured entry B) The configured address has moved to a different underlying interface C) The underlying interface needs to be deleted and re-added.
func (*ReconcileHost) ReconcileStaleInterfaceDataNetworks ¶ added in v1.0.0
func (r *ReconcileHost) ReconcileStaleInterfaceDataNetworks(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileStaleInterfaceDataNetworks will examine the current set of system interfaces and determine if any interface-network associations need to be removed from any interface. This step is critical to proper reconciliation of interfaces because when moving a network from one interface to another it cannot be added to the new interface until it has been removed from the old network. The only way to accomplish that is to execute this in two phases. The first phase is handled by this method and deletes old associations. The second phase is handled by Reconcile*Interfaces and adds missing associations.
func (*ReconcileHost) ReconcileStaleInterfaceNetworks ¶ added in v1.0.0
func (r *ReconcileHost) ReconcileStaleInterfaceNetworks(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileStaleInterfaceNetworks will examine the current set of system interfaces and determine if any interface-network associations need to be removed from any interface. This step is critical to proper reconciliation of interfaces because when moving a network from one interface to another it cannot be added to the new interface until it has been removed from the old network. The only way to accomplish that is to execute this in two phases. The first phase is handled by this method and deletes old associations. The second phase is handled by Reconcile*Interfaces and adds missing associations.
func (*ReconcileHost) ReconcileStaleInterfaces ¶
func (r *ReconcileHost) ReconcileStaleInterfaces(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileStaleInterfaces will examine the current set of system interfaces and determine if any of them need to be deleted. An interface needs to be deleted if:
A) it no longer exists in the list of interfaces to be configured B) it still exists as a VLAN, but has a different vlan-id value or lower interface C) it still exists as a Bond, but has no members in common with the system interface. D) it still exists as a VF, but has a different lower interface.
func (*ReconcileHost) ReconcileStaleOSDs ¶
func (r *ReconcileHost) ReconcileStaleOSDs(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileStaleOSDs is responsible for removing any OSD resources that are either no longer in the configured list or their function or journal has changed.
func (*ReconcileHost) ReconcileStaleRoutes ¶
func (r *ReconcileHost) ReconcileStaleRoutes(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileStaleRoutes examines the current set of routes and deletes any routes that are stale or need to be re-provisioned. A route needs to be deleted if:
A) The system route does not have an equivalent configured entry B) The configured route has moved to a different underlying interface C) The underlying interface needs to be deleted and re-added.
func (*ReconcileHost) ReconcileStorage ¶
func (r *ReconcileHost) ReconcileStorage(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileStorage is responsible for reconciling the Storage configuration of a host resource.
func (*ReconcileHost) ReconcileVFInterfaces ¶
func (r *ReconcileHost) ReconcileVFInterfaces(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) (err error)
func (*ReconcileHost) ReconcileVLANInterfaces ¶
func (r *ReconcileHost) ReconcileVLANInterfaces(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) (err error)
func (*ReconcileHost) ReconcileVolumeGroups ¶
func (r *ReconcileHost) ReconcileVolumeGroups(client *gophercloud.ServiceClient, instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, host *v1info.HostInfo) error
ReconcileVolumeGroups is responsible for reconciling the volume group configuration of a host resource.
func (*ReconcileHost) StopAfterInSync ¶
func (r *ReconcileHost) StopAfterInSync() bool
StopAfterInSync determines whether the reconciler should continue processing change requests after the configuration has been reconciled a first time.
func (*ReconcileHost) UpdateRequired ¶
func (r *ReconcileHost) UpdateRequired(instance *starlingxv1.Host, profile *starlingxv1.HostProfileSpec, h *hosts.Host) (opts hosts.HostOpts, result bool, err error)
UpdateRequired determines if any of the configured attributes mismatch with those in the running system. If there are mismatches then true is returned in the result and opts is configured with only those values that need to change.
func (*ReconcileHost) ValidateProfile ¶
func (r *ReconcileHost) ValidateProfile(host *starlingxv1.Host, profile *starlingxv1.HostProfileSpec) error
ValidateProfile examines a composite profile and performs basic validation to ensure that all required attributes have been supplied. This must be done at runtime rather than at schema validation time because most fields are marked as optional in the schema so that profile inheritance can be used to specify only subsets of attributes at each profile level (e.g., an interface profile does not need to set personality or administrative state, but some profile in the inheritance chain must). Therefore each individual profile itself may not be valid but when attached to a host the full chain of profiles must produce a valid set of attributes.
type RequiredState ¶
type RequiredState string
RequiredState defines an alias that represents in which host state(s) is a resource allowed to be provisioned.
const ( RequiredStateNone RequiredState = "none" RequiredStateAny RequiredState = "any" RequiredStateEnabled RequiredState = "enabled" RequiredStateDisabled RequiredState = "disabled" )
Defines the value values for the RequiredState type alias.