-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
invalid memory address or nil pointer dereference azure.mapFromVMScaleSetVM #13574
Comments
If the azure service discovery finds a VM scale set then we get this error. If the service discovery is for a subscription without one it still works |
from the stacktrace, the issue seems to be here. let me raise a PR func mapFromVMScaleSetVM(vm armcompute.VirtualMachineScaleSetVM, scaleSetName string) virtualMachine {
- osType := string(*vm.Properties.StorageProfile.OSDisk.OSType)
+ osType := getOSTypeFromVirtualMachineScaleSetVM(vm)
tags := map[string]*string{}
networkInterfaces := []string{}
var computerName string
@@ -702,3 +702,23 @@ func (d *Discovery) getFromCache(nicID string) (*armnetwork.Interface, bool) {
net, found := d.cache.Get(nicID)
return net, found
}
+
+func getOSTypeFromVirtualMachineScaleSetVM(vm armcompute.VirtualMachineScaleSetVM) string {
+ if vm.Properties == nil {
+ return ""
+ }
+
+ if vm.Properties.StorageProfile == nil {
+ return ""
+ }
+
+ if vm.Properties.StorageProfile.OSDisk == nil {
+ return ""
+ }
+
+ if vm.Properties.StorageProfile.OSDisk.OSType == nil {
+ return ""
+ }
+
+ return string(*vm.Properties.StorageProfile.OSDisk.OSType)
+}
|
Closed by #13578 |
Hello I just updated to v2.50.1 from v2.49.1 and started seeing an error that looked similar:
Is it possibly related? Has anyone else thats updated seen this? |
We need to wait longer than 1 day for feedback to come in on the release candidate. |
What did you do?
The prometheus pod can't start anymore and gets this error message before dying
If I remove all Azure sd configs the pod is able to start again
What did you expect to see?
Pod starting
What did you see instead? Under which circumstances?
Crashloop
System information
AKS 1.27.3
Prometheus version
Prometheus configuration file
No response
Alertmanager version
No response
Alertmanager configuration file
No response
Logs
No response
The text was updated successfully, but these errors were encountered: