Foreman 1.13.2 - URL /host/<host>/parent_facts/partitions::/dev../facts not found on server

I was digging into host facts details on my Foreman 1.13.2. When I got to
partitions and clicked the + I got the error:

The requested URL
/hosts/<host>/parent_facts/partitions::/dev/mapper/rootvg-home/facts was
not found on this server.

All of the host partition names and paths are correct so I ran Facter on
the host, so I know Facter is generating the data. For this path it
returned:

{
/dev/mapper/rootvg-home => {
filesystem => "xfs",
mount => "/home",
size => "2.00 GiB",
size_bytes => 2147483648,
uuid => "2d66dc4a-80f1-4111-809b-cae3fe9bb3af"
},

Is the dynamic web link being generated incorrectly somewhere? The Fact
Page for the partitions page
is https://<foreman>/hosts/<hostname>t/parent_facts/partitions/facts while
the page for the home partition is
/hosts/<host>/parent_facts/partitions::/dev/mapper/rootvg-home/facts,

The facts file
under /opt/puppetlabs/server/data/puppetserver/yaml/facts/<host>.yaml and
/opt/puppetlabs/server/data/puppetserver/yaml/node/<host>.yaml has the data
as well:

partitions:
"/dev/mapper/rootvg-home":
filesystem: xfs
mount: "/home"
size: 2.00 GiB
size_bytes: 2147483648
uuid: 2d66dc4a-80f1-4111-809b-cae3fe9bb3af

Is this a bug in Foreman or am I missing some configuration / setting
somewhere for it to import the data properly?

It is an oddity that will be questioned by management at some point in the
future so I want to get our ahead of it.

Can anyone provide any assistance?

Thanks!

Just adding to the post I checked the Foreman DB for this particular host
ID for this mount point / partition. It seems that Foreman has the data,
but somehow isn't properly providing it from the Facts page on the Hosts ->
All Hosts -> <host> -> Facts -> Partitions -> <partition>

foreman=# select A.id, A.name, B.value, B.fact_name_id, B.host_id
from fact_names A, fact_values B
where A.id = B.fact_name_id and A.name like '%mountpoints::/home%' and
B.host_id = '5';
id | name | value

··· > fact_name_id | host_id -----+-------------------------------------+---------------------------------------------------+--------------+--------- 264 | mountpoints::/home::used_bytes | 33837056 > 264 | 5 263 | mountpoints::/home::used | 32.27 MiB > 263 | 5 262 | mountpoints::/home::size_bytes | 2136997888 > 262 | 5 261 | mountpoints::/home::size | 1.99 GiB > 261 | 5 260 | mountpoints::/home::options | ["rw", "relatime", "attr2", "inode64", "noquota"] | 260 | 5 259 | mountpoints::/home::filesystem | xfs > 259 | 5 258 | mountpoints::/home::device | /dev/mapper/rootvg-home > 258 | 5 257 | mountpoints::/home::capacity | 1.58% > 257 | 5 256 | mountpoints::/home::available_bytes | 2103160832 > 256 | 5 255 | mountpoints::/home::available | 1.96 GiB > 255 | 5 254 | mountpoints::/home | > 254 | 5

> I was digging into host facts details on my Foreman 1.13.2. When I got
> to partitions and clicked the + I got the error:
>
> The requested URL
> /hosts/<host>/parent_facts/partitions::/dev/mapper/rootvg-home/facts was
> not found on this server.
>
[…]
>
> Is this a bug in Foreman or am I missing some configuration / setting
> somewhere for it to import the data properly?

Yes, it's a bug that's tracked at
Bug #16818: nested facts can lead to invalid links - Foreman.

··· On 11/01/17 18:08, James Perry wrote:


Dominic Cleal
dominic@cleal.org

Thanks!