GithubHelp home page GithubHelp logo

Comments (7)

darshanime avatar darshanime commented on May 21, 2024 1

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)
+}

from prometheus.

McHammar avatar McHammar commented on May 21, 2024

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 prometheus.

bboreham avatar bboreham commented on May 21, 2024

Closed by #13578

from prometheus.

dpericaxon avatar dpericaxon commented on May 21, 2024

Hello I just updated to v2.50.1 from v2.49.1 and started seeing an error that looked similar:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x123e50a]

goroutine 1605 [running]:
github.com/prometheus/prometheus/discovery/azure.(*Discovery).refresh.func1({{0xc180dc21e0, 0x92}, {0xc180db2de0, 0xe}, {0xc180db3362, 0xe}, {0xc179d65620, 0x21}, {0xc180db2df0, 0xd}, ...})
	github.com/prometheus/prometheus/discovery/azure/azure.go:438 +0xb4a
created by github.com/prometheus/prometheus/discovery/azure.(*Discovery).refresh in goroutine 1174
	github.com/prometheus/prometheus/discovery/azure/azure.go:375 +0xa55

Is it possibly related? Has anyone else thats updated seen this?

from prometheus.

bboreham avatar bboreham commented on May 21, 2024

I think it's more like #13643, which was a bad merge, fixed by #13702.

There is a release candidate for 2.51.0 out now which has this fix.

from prometheus.

dpericaxon avatar dpericaxon commented on May 21, 2024

I think it's more like #13643, which was a bad merge, fixed by #13702.

There is a release candidate for 2.51.0 out now which has this fix.

Great! Will there be an official release for 2.51.0 today/tomorrow? Thank you for the quick response by the way!

from prometheus.

bboreham avatar bboreham commented on May 21, 2024

We need to wait longer than 1 day for feedback to come in on the release candidate.
Please try it out! If nobody has any feedback this then will become 2.51.0, you just get it faster.

from prometheus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.