| Summary: | Native (sigar) Platform plugin states "Win32" even on 64 bit systems | |||
|---|---|---|---|---|
| Product: | [JBoss] JBoss Operations Network | Reporter: | Tom Fonteyne <tfonteyn> | |
| Component: | Plugin -- Other | Assignee: | RHQ Project Maintainer <rhq-maint> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | |
| Severity: | low | Docs Contact: | ||
| Priority: | low | |||
| Version: | JON 3.0.0 | CC: | hrupp, myarboro, skondkar | |
| Target Milestone: | ER01 | |||
| Target Release: | JON 3.2.0 | |||
| Hardware: | x86_64 | |||
| OS: | Windows | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 804705 (view as bug list) | Environment: | ||
| Last Closed: | Type: | --- | ||
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Bug Depends On: | ||||
| Bug Blocks: | 804705 | |||
cloned to RHQ as: https://bugzilla.redhat.com/show_bug.cgi?id=804705 medium, no target release per bz triage (crouch, mfoley, asantos, loleary) According to https://bugzilla.redhat.com/show_bug.cgi?id=804705#c8 this is now in master and will be in er1 Verified on version : 3.2.0.ER5 build Number :2cb2bc9:225c796 The OS name now shows "Windows" and Architecture value "x64" in details view and on monitoring->traits tab. |
Description of problem: 64 bit Windows systems will be reported as being "Win32" This is because org/ rhq/ core/ system/ NativeSystemInfo.java report the string "as-is" from the native Sigar library Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. Start an agent in 64 bit JDK on a 64 bit Windows and let it discover the platform. 2. Import it in the JON server, and look at the details of the OS. 3. Actual results: Win32 Expected results: Windows Server 2008 R2 (or similar for other Windows versions of course) Additional info: This is easy to fix by always reading the OS version from Java and NOT from Sigar. org/ rhq/ core/ system/ NativeSystemInfo.java: 106 public String getOperatingSystemName() { 107 return OperatingSystem.getInstance().getName(); 108 } should be changed to (line numbers from JavaSystemInfo.java): 098 public String getOperatingSystemName() { 099 return System.getProperty("os.name"); 100 } It is debatable, but advisable to do the same for other calls in this class where Java is delivering a "good" result. Examples would be: getOperatingSystemVersion() getNumberOfCpus() and likely more.