Re: Weird sys.fqhost value
Bas van der Vlies <[email protected]>
| Newsgroups | gmane.comp.sysutils.cfengine.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Robert,
On which OS?
I have done dome tests and I also rely on this variable. But on our
machines I do not see this weird behaviour.
You can check:
```
/etc/hosts for networking
/etc/hostname : This will be read by boot scripts on boot time and
set its value.
/proc/sys/kernel/hostname : Current hostname.
/etc/sysconfig/network : Networking (HOSTNAME=”server1″ parameter)
```
maybe there is some weird character somewehere
On 23/09/2022 10:37, 'Robert Markula' via help-cfengine wrote:
> Greetings everyone,
>
> Since the upgrade from Cfengine 3.15 to 3.18 I can observe a weird
> '*sys.fqhost*' value.
>
> In 3.15.2 this variable is correct:
> default:sys.fqhost test1.example.com
> inventory,source=agent,attribute_name=Host
> name
>
> In 3.18.2 and 3.20.0 however, there are numerous spaces around the hostname:
> default:sys.fqhost
>
>
>
>
>
>
> test1.
>
>
>
>
>
>
> example.com
> inventory,source=agent,attribute_name=Host name
> default:sys.uqhost test1
> inventory,source=agent,attribute_name=none
> default:sys.domain example.com
> source=agent
>
> Note the many spaces between the hostname and the domain name.
>
> Accordingly, cf-exec fails to run with his message in /var/log/syslog:
> error: Couldn't open
> '/var/cfengine/outputs/cf___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________test1_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________example_com__1663916430_Fri_Sep_23_09_00_30_2022_0x7ff5fa880b80' - aborting exec. (fopen: File name too long)
>
> 'hostname -f' gives:
> test1.example.com
>
> root@test1:~# hostname
> test1
>
> And in the body common control in promises.cf I have set:
> body common control
> {
> [...]
> domain => "example.com";
> [...]
> }
>
> And, for completeness sake:
> root@test1:~# cat /etc/hosts
> 127.0.0.1 localhost
> 127.0.1.1 test1.example.com test1
>
> ::1 localhost ip6-localhost ip6-loopback
> ff02::1 ip6-allnodes
> ff02::2 ip6-allrouters
>
> root@test1:~# cat /etc/hostname
> test1
>
> So I have absolutely no idea where these spaces are coming from. Any ideas?
>
> --
> You received this message because you are subscribed to the Google
> Groups "help-cfengine" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/help-cfengine/4dc4492a-d42a-4610-a9df-ad15dd0a36dcn%40googlegroups.com <https://groups.google.com/d/msgid/help-cfengine/4dc4492a-d42a-4610-a9df-ad15dd0a36dcn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
--
Bas van der Vlies
| High Performance Computing & Visualization | SURF| Science Park 140 |
1098 XG Amsterdam
| T +31 (0) 20 800 1300 | [email protected] | www.surf.nl |
--
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/b400fe85-4dca-22be-ed76-193680963b1b%40surf.nl.