Project

General

Profile

Actions

Bug #4721

closed

processes start date in AIX inventory displayed as "Bad format'

Added by Vincent MEMBRÉ almost 10 years ago. Updated about 9 years ago.

Status:
Released
Priority:
2
Category:
Web - Nodes & inventories
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

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


Related issues 2 (0 open2 closed)

Related to Rudder - Bug #4742: Process start date are displayed as "bad format" in Rudder web interfaceReleasedFrançois ARMAND2014-04-08Actions
Blocked by Rudder - User story #4594: Upgrade FusionInventory to version 2.3.6 (AIX only)ReleasedMatthieu CERDA2014-04-08Actions
Actions #1

Updated by Vincent MEMBRÉ almost 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.

Actions #2

Updated by Vincent MEMBRÉ almost 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...

Actions #3

Updated by Vincent MEMBRÉ almost 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)

Actions #4

Updated by Matthieu CERDA almost 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.

Actions #5

Updated by Matthieu CERDA almost 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

Actions #6

Updated by Matthieu CERDA almost 10 years ago

Actions #7

Updated by Matthieu CERDA almost 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 ?

Actions #8

Updated by Matthieu CERDA almost 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

Actions #9

Updated by Jonathan CLARKE almost 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.

Actions #10

Updated by Matthieu CERDA almost 10 years ago

PR opened in Fusion repository + Ticket => https://github.com/fusinv/fusioninventory-agent/pull/17

Actions #11

Updated by Matthieu CERDA almost 10 years ago

  • Status changed from Discussion to Pending technical review
  • Assignee changed from Matthieu CERDA to Jonathan CLARKE
Actions #12

Updated by Matthieu CERDA almost 10 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset packages:commit:0d6e24b8693d084e08efbf9a11a21badc0ddb632.

Actions #13

Updated by Matthieu CERDA almost 10 years ago

Applied in changeset packages:commit:6adf79416566141a8e78cbc36ba9b47e6aed920b.

Actions #14

Updated by Vincent MEMBRÉ almost 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:

Actions #15

Updated by Benoît PECCATTE about 9 years ago

  • Category changed from 26 to Web - Nodes & inventories
Actions

Also available in: Atom PDF