Bug #4721
closedprocesses start date in AIX inventory displayed as "Bad format'
Added by Vincent MEMBRÉ over 10 years ago. Updated over 9 years ago.
Description
Processes start date cannot be used from aix inventories and are displayed as "Bad Format".
Their format looks like: 2014-03-31 19:11:16
Updated by Vincent MEMBRÉ over 10 years ago
In fact the date is missing from fusion inventory. I think
"Bad format" is displayed when there is nothing to show...
We need at least to correct and display nothing...
We may also look into fusion how to display processes startdate from aix.
Updated by Vincent MEMBRÉ over 10 years ago
In fact, start date is not present for all processes:
If the start date is missing => the webapp will display "bad format" => behavior when no info
If the start date is present, the format used to parse it is "yyyy-MM-DD HH:mm" but those values contains the seconds : 2014-03-31 19:11:16. hence the format will not be accepted and will have no value stored in Rudder inventory ( giving "bad format" )
process with missing start dates comes from a ps command.
Those with a start date comes from other parts...
Updated by Vincent MEMBRÉ over 10 years ago
In fact, in fusion 2.2: ps aux is used to get all processes
those older than 24h hours have not their start date parsed (format is like Feb 20, not accepted by fusion)
the others are parsed (format is hh:mm:ss which is parsed correctly)
Updated by Matthieu CERDA over 10 years ago
Fusion 2.3.X seems to contain a bug that fails to output any process at all, it seems the _getProcessesOther function has a faulty matching that fails to correctly parse AIX ps.
Using:
next unless $line =~ /^ \s* (\S+) \s+ (\S+) \s+ (\S+) \s+ (\S+) \s+ (\S+) \s+ (\S+) \s+ (\S+\s?\S+) \s+ \S+ \s+ (.*\S) /x;
Seems to do the trick, but Linux support has not been tested yet.
Updated by Matthieu CERDA over 10 years ago
Bug fixed and PR'ed to fusion.
I will commit it in Rudder as soon as we will have an updated Fusion version. => #4594
Updated by Matthieu CERDA over 10 years ago
Fusion PR is here: https://github.com/fusinv/fusioninventory-agent/pull/16
Updated by Matthieu CERDA over 10 years ago
- Status changed from New to 8
Note: this bug actually has two parts, one to fix the fusion code and one to fix the way the Rudder webapp parses the data itself :)
The expected "started" dates go from beeing like "2014" to "Feb20" OR "Feb 20" and eventually "2012-10-01 10:01:00". There is quite a lot of formats that can be given, we should find a way to make things work knowing that.
Vince, can you please lend me some webapp science here ? how can we solve this webapp side ?
Updated by Matthieu CERDA over 10 years ago
- Status changed from 8 to Pending technical review
- Assignee changed from Vincent MEMBRÉ to Jonathan CLARKE
- % Done changed from 0 to 100
- Pull Request set to https://github.com/Normation/rudder-packages/pull/301
PR is ready
Updated by Jonathan CLARKE over 10 years ago
- Status changed from Pending technical review to Discussion
- Assignee changed from Jonathan CLARKE to Matthieu CERDA
I see what you've done here, and it's a step in the right direction.
However, looking at the ps command, it occurs to me that we could use the "etime" option to get the number of days-hours-minutes-seconds since the command was launched, which is always printed with the same precision, and parse that, to calculate the started date.
Updated by Matthieu CERDA over 10 years ago
PR opened in Fusion repository + Ticket => https://github.com/fusinv/fusioninventory-agent/pull/17
Updated by Matthieu CERDA over 10 years ago
- Status changed from Discussion to Pending technical review
- Assignee changed from Matthieu CERDA to Jonathan CLARKE
Our PR is updated too ! https://github.com/Normation/rudder-packages/pull/301
Updated by Matthieu CERDA over 10 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset packages:commit:0d6e24b8693d084e08efbf9a11a21badc0ddb632.
Updated by Matthieu CERDA over 10 years ago
Applied in changeset packages:commit:6adf79416566141a8e78cbc36ba9b47e6aed920b.
Updated by Vincent MEMBRÉ over 10 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 2.10.1, which was released today.
Check out:
- The release announcement: http://www.rudder-project.org/pipermail/rudder-announce/2014-June/000087.html
- The full ChangeLog: http://www.rudder-project.org/foswiki/bin/view/System/Documentation:ChangeLog27
- Download information: https://www.rudder-project.org/site/get-rudder/downloads/
Updated by Benoît PECCATTE over 9 years ago
- Category changed from 26 to Web - Nodes & inventories