Hammer Content Export Missing metadata.json

OS: RHEL 8.6
Foreman 3.4 with Katello 4.6

I ran this command hammer content-export complete library --organization=my_org and reviewed the files at /var/lib/pulp/exports/<ORG>/export_path... I have noted that the tar.gz and -toc.json files are present but the metadata.json is missing.

The system has STIG settings applied to it and I presume the problem lies there somewhere. I did note the instructions that state:

If you mount the /tmp directory as a separate file system, you must use the exec mount option in the /etc/fstab file. If /tmp is already mounted with the noexec option, you must change the option to exec and re-mount the file system. This is a requirement for the puppetserver service to work.

I made sure that my /etc/fstab is setup appropriately after applying the STIG settings.

Can someone tell me more about how the metadata.json gets created and processed?

Also, for reference here is my partition layout:

NAME                                          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                                             8:0    0 745.2G  0 disk
├─sda1                                          8:1    0   600M  0 part  /boot/efi
├─sda2                                          8:2    0     1G  0 part  /boot
└─sda3                                          8:3    0   640G  0 part
  └─luks-a4f2c367-50b3-496f-980b-9cdd70d846e5 253:0    0   640G  0 crypt
    ├─rhel-root                               253:1    0    20G  0 lvm   /
    ├─rhel-swap                               253:2    0    32G  0 lvm   [SWAP]
    ├─rhel-var_lib_pgsql                      253:3    0    20G  0 lvm   /var/lib/pgsql
    ├─rhel-tmp                                253:4    0     6G  0 lvm   /tmp
    ├─rhel-var_log                            253:5    0    16G  0 lvm   /var/log
    ├─rhel-home                               253:6    0    10G  0 lvm   /home
    ├─rhel-var                                253:7    0    30G  0 lvm   /var
    ├─rhel-var_log_audit                      253:8    0     4G  0 lvm   /var/log/audit
    ├─rhel-var_tmp                            253:9    0     2G  0 lvm   /var/tmp
    └─rhel-var_lib_pulp                       253:10   0   500G  0 lvm   /var/lib/pulp
sdb                                             8:16   0   477G  0 disk
└─sdb1                                          8:17   0   477G  0 part  /var/lib/pulp/exports
sr0                                            11:0    1  1024M  0 rom

Many thanks for your assistance!

I think I just answered my own question. I had noticed comments in the fstab file that said to be sure to run systemctl daemon-reload after making any changes. I ran the daemon-reload and then ran my content-export again. This time the metadata.json file is present. Maybe I missed running daemon-reload the first time after changing the noexec option for /tmp? Anyhow, it seems to all be good now.

If you ever need to retrieve a metadata.json that’s gone missing, you can do so by first getting the export history ID:

hammer content-export list --content-view="My_Content_View" --organization="My_Organization"

And then

hammer content-export generate-metadata --id="xxx"
1 Like