| Field | Value |
|---|---|
| Status | implementable |
| Author(s) | @eshulman |
| Created | 2026-02-05 |
| Last Updated | 2026-02-05 |
| Tracking Issue | TBD |
This enhancement introduces a new SubResourcesReady condition for ORC resources that manage sub-resources (e.g., SecurityGroup→Rules, Router→Interfaces, LoadBalancer→Pools/Listeners/Members). This condition provides visibility into the status of sub-resources and enables users to define policies based on sub-resource readiness.
Currently, ORC resources with sub-resources have ambiguous status reporting:
Available=Truetypically means the main resource exists and can be operated onProgressing=Trueindicates the controller is working, but doesn't distinguish between main resource operations and sub-resource operations
This creates confusion for users:
| Scenario | Available | Progressing | User can distinguish? |
|---|---|---|---|
| SG created, rules pending | True | True | No - could be tags updating |
| SG created, rule failed | True | True/False | No - unclear what failed |
| SG created, tag update in progress | True | True | No - same as above |
| SG fully ready | True | False | Yes |
Users need to know when sub-resources are fully reconciled to:
- Safely proceed with dependent resources (e.g., Port referencing SecurityGroup)
- Debug sub-resource failures without inspecting controller logs
- Build automation that waits for complete resource readiness
This pattern applies to multiple controllers, and having a consistent approach across the project improves predictability and user experience.
Related discussion: #651
- Add a
SubResourcesReadycondition to all ORC resources that manage sub-resources - Provide clear visibility into sub-resource status for users
- Report detailed error information when sub-resources fail
- Establish a consistent pattern across all controllers with sub-resources
- Enable future policy-based behavior on sub-resource readiness
- Changing the semantics of
AvailableorProgressingconditions (Phase 1) - Implementing dependency management based on
SubResourcesReady(Phase 2) - Resource-specific conditions (e.g.,
RulesReady,InterfacesReady) - one consistent condition is preferred for simplicity
Add a third standard condition SubResourcesReady to resources that manage sub-resources:
status:
conditions:
- type: Available
status: "True"
reason: Success
message: "OpenStack resource is available"
- type: Progressing
status: "False"
reason: Success
message: "OpenStack resource is up to date"
- type: SubResourcesReady
status: "True"
reason: Success
message: "All sub-resources are ready"| Condition | Meaning |
|---|---|
Available |
Main resource exists and can be operated on (unchanged) |
Progressing |
Controller is actively reconciling something (unchanged) |
SubResourcesReady |
All sub-resources are in their desired state |
| Scenario | Available | Progressing | SubResourcesReady |
|---|---|---|---|
| Main resource creating | False | True | False |
| Main resource ready, sub-resources pending | True | True | False |
| Main resource ready, sub-resource failed | True | False | False (with error) |
| Fully ready | True | False | True |
| Tag update in progress | True | True | True |
| Sub-resource update in progress | True | True | False |
When a sub-resource fails, the condition should include details:
- type: SubResourcesReady
status: "False"
reason: RuleCreationFailed
message: "Rule 'allow-ssh' failed: invalid CIDR format for remoteIPPrefix"For multiple failures, aggregate the messages:
- type: SubResourcesReady
status: "False"
reason: MultipleFailures
message: "2 sub-resources failed: Rule 'allow-ssh' (invalid CIDR), Rule 'allow-http' (port out of range)"Resources that would gain the SubResourcesReady condition:
| Resource | Sub-resources |
|---|---|
| SecurityGroup | Rules |
| Router | Interfaces, Routes |
| LoadBalancer | Pools, Listeners, Members, HealthMonitors |
| Server | Attached volumes, Network interfaces (if managed) |
| Network | Segments (if applicable) |
| Subnet | Allocation pools, Host routes |
Resources without sub-resources would not have this condition (e.g., Image, Flavor, FloatingIP).
- Define
SubResourcesReadyas a standard condition type in the API - Add the condition to status writers for affected resources
- Implement sub-resource tracking in actuators
- Report detailed error messages for failures
- No changes to dependency management - existing behavior unchanged
Example implementation pattern for actuators:
func (a actuator) reconcileSubResources(ctx context.Context, obj *orcv1alpha1.SecurityGroup, osResource *osResourceT) progress.ReconcileStatus {
var failedRules []string
for _, rule := range obj.Spec.Resource.Rules {
if err := a.ensureRule(ctx, osResource, rule); err != nil {
failedRules = append(failedRules, fmt.Sprintf("%s: %s", rule.Description, err))
}
}
if len(failedRules) > 0 {
return progress.SubResourcesFailed(failedRules)
}
return progress.SubResourcesReady()
}-
Add configuration option to control dependency behavior:
spec: managedOptions: waitForSubResources: true # Wait for SubResourcesReady before dependents proceed
-
Update dependency management to optionally wait for
SubResourcesReady -
This may change existing behavior based on the policy selected
Add new condition type constant:
const (
ConditionAvailable = "Available"
ConditionProgressing = "Progressing"
ConditionSubResourcesReady = "SubResourcesReady"
)Add new condition reasons:
const (
ConditionReasonSubResourcesReady = "SubResourcesReady"
ConditionReasonSubResourcesPending = "SubResourcesPending"
ConditionReasonSubResourceFailed = "SubResourceFailed"
ConditionReasonMultipleFailures = "MultipleFailures"
)Risk: Existing automation may not expect the new condition.
Mitigation: Phase 1 is purely additive. The new condition doesn't change existing Available or Progressing behavior. Users checking for Available=True && Progressing=False will continue to work.
Risk: Tracking sub-resource status adds complexity to reconciliation.
Mitigation: Sub-resource status is already computed during reconciliation. This change primarily affects how status is reported, not computed.
Risk: Adding conditions to all resources with sub-resources could make status verbose.
Mitigation: Only resources with meaningful sub-resources get the condition. Resources like Image or Flavor don't need it.
Risk: Enabling waitForSubResources policy could change existing workflows.
Mitigation:
- Phase 2 is opt-in via explicit configuration
- Default behavior remains unchanged
- Document clearly in release notes
Risk: Resources with many sub-resources (e.g., SecurityGroup with 50 rules) could have very long error messages.
Mitigation: Limit message length and indicate "and X more failures" when truncated.
Add conditions like RulesReady, InterfacesReady, PoolsReady for each resource type.
Rejected because:
- Increases complexity of dependency management (need to watch different conditions per resource type)
- Harder to build generic tooling
- Inconsistent user experience
Make Available=False when sub-resources aren't ready.
Rejected because:
- Changes semantics of
Available(resource IS available for operations) - Could break existing automation
- Loses the distinction between "can operate on" and "fully reconciled"
Rely on Progressing=False to indicate everything is ready.
Rejected because:
- Doesn't distinguish between main resource and sub-resource issues
- Tag updates would show same status as rule failures
- No clear indication of what's still pending
- 2026-02-05: Enhancement proposed