Jira (FACT-2962) Facter 4 should accept the same time units in ttls (config file field) as Facter 3

14 views
Skip to first unread message

Oana Tanasoiu (Jira)

unread,
Mar 10, 2021, 5:59:02 AM3/10/21
to puppe...@googlegroups.com
Oana Tanasoiu created an issue
 
Facter / Bug FACT-2962
Facter 4 should accept the same time units in ttls (config file field) as Facter 3
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2021/03/10 2:58 AM
Priority: Normal Normal
Reporter: Oana Tanasoiu

Facter 4 supports the following time units for ttls: second(s), minute(s), hour(s), day(s).

In order to be fully compatible with facter 3, Facter 4 should support similar time units:
https://github.com/puppetlabs/cpp-hocon/blob/6ba46c077facd9339115f075d1521d20584826fd/lib/src/config.cc#L443-L461
and
https://github.com/puppetlabs/cpp-hocon/blob/6ba46c077facd9339115f075d1521d20584826fd/lib/src/config.cc#L473-L475

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Oana Tanasoiu (Jira)

unread,
Mar 10, 2021, 6:38:03 AM3/10/21
to puppe...@googlegroups.com
Oana Tanasoiu updated an issue
Change By: Oana Tanasoiu
Facter 4 supports the following time units for ttls: second(s), minute(s), hour(s), day(s).

In order to be fully compatible with facter 3, Facter 4 should support similar time units:
[https://github.com/puppetlabs/cpp-hocon/blob/6ba46c077facd9339115f075d1521d20584826fd/lib/src/config.cc#L443-L461]
and
[https://github.com/puppetlabs/cpp-hocon/blob/6ba46c077facd9339115f075d1521d20584826fd/lib/src/config.cc#L473-L475]
Also it seems like `get_group_ttls` method is called more times than it should, steps to reproduce: use some invalid units in ttls like 
{code:java}
facts : {
    ttls : [
        { "timezone" : 30 invalid_unit },
    ]
}{code}
an error message will be display several times: 
{code:java}
~/projects/facter~ bundle exec facter -c facter.conf
[2021-03-10 13:36:42.361572 ] ERROR Facter::FactGroups - Could not parse time unit invalid_unit (try second(s), minute(s), hour(s) or day(s))
[2021-03-10 13:36:42.366855 ] ERROR Facter::FactGroups - Could not parse time unit invalid_unit (try second(s), minute(s), hour(s) or day(s))
[2021-03-10 13:36:42.367440 ] ERROR Facter::FactGroups - Could not parse time unit invalid_unit (try second(s), minute(s), hour(s) or day(s)){code}

Oana Tanasoiu (Jira)

unread,
Mar 10, 2021, 7:50:03 AM3/10/21
to puppe...@googlegroups.com

Oana Tanasoiu (Jira)

unread,
Mar 10, 2021, 7:53:02 AM3/10/21
to puppe...@googlegroups.com

Oana Tanasoiu (Jira)

unread,
Mar 10, 2021, 7:53:03 AM3/10/21
to puppe...@googlegroups.com

Oana Tanasoiu (Jira)

unread,
Mar 10, 2021, 7:54:02 AM3/10/21
to puppe...@googlegroups.com

Oana Tanasoiu (Jira)

unread,
Mar 10, 2021, 7:54:03 AM3/10/21
to puppe...@googlegroups.com

Dorin Pleava (Jira)

unread,
Mar 12, 2021, 3:15:02 AM3/12/21
to puppe...@googlegroups.com

Claire Cadman (Jira)

unread,
Mar 16, 2021, 5:41:03 AM3/16/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages