Skip to content

Commit 49b8c57

Browse files
committed
Fix ceilometer compute agent TLS and Region config
Add CAFile and Region template parameters to the compute agent config generation, matching the central agent configuration. Without CAFile, the compute agent's [service_credentials] section lacks a cafile setting when TLS is enabled, causing Keystone SSL verification failures. Without Region, compute agents in multi-region deployments get no region_name configured. Closes: OSPRH-27068
1 parent 39a4be8 commit 49b8c57

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

internal/controller/ceilometer_controller.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,6 +1397,7 @@ func (r *CeilometerReconciler) generateComputeServiceConfig(
13971397
"ceilometer_compute_image": instance.Spec.ComputeImage,
13981398
"ceilometer_ipmi_image": instance.Spec.IpmiImage,
13991399
"TLS": false,
1400+
"Region": keystoneAPI.GetRegion(),
14001401
}
14011402

14021403
// Try to get Application Credential from the secret specified in the CR
@@ -1425,6 +1426,7 @@ func (r *CeilometerReconciler) generateComputeServiceConfig(
14251426
templateParameters["TLS"] = true
14261427
templateParameters["TlsCert"] = "/etc/ceilometer/tls/tls.crt"
14271428
templateParameters["TlsKey"] = "/etc/ceilometer/tls/tls.key"
1429+
templateParameters["CAFile"] = tls.DownstreamTLSCABundlePath
14281430
}
14291431

14301432
cms := []util.Template{

templates/ceilometercompute/config/ceilometer.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ interface = internalURL
2424
{{ if (index . "Region") -}}
2525
region_name = {{ .Region }}
2626
{{ end -}}
27+
{{- if .TLS }}
28+
cafile = {{ .CAFile }}
29+
{{- end }}
2730

2831
[compute]
2932
instance_discovery_method=libvirt_metadata

0 commit comments

Comments
 (0)