Proxy full sync after content promotion

Hi all

Foreman v 3.15, katello 4.17

My previous ticket has followed the wrong path, so to keep things cleaner I’ve created this in hope for some help.

We have 4x smart proxies and each month a cron runs to publish the new synced content to all content views. I’m aware that proxy syncs begin automatically by Foreman, as soon as new content is published

Is there a way to trigger this proxy sync to be a full sync, not optimized as we sometimes receive old or wrong data and need to fully sync manually afterwards - which then fixes it

Example of the cron:

EL8

03 04 28 * * root hammer content-view publish --organization ‘Main’ --name ‘EL8’ --lifecycle-environments dev,prod --description “New EL8 content as of $(date ‘+%F’) for Monthly Patching” --async

Thanks

What you can do is disable automatic smart proxy sync on the settings page and then do a complete sync manually whenever needed. I am not aware of any way to make automatic proxy syncs perform complete syncs.

I would also question the wisdom of using complete syncs by default. I cannot imagine why that would be necessary. If normal optimized sync reliably or often leads to issues that can be resolved by a complete sync, there is something very weird going on and we should fix that issue. Especially for smart proxy syncs, complete syncs are just going to be hours and hours of full worker load for pointless processing of packages that have not changed since last sync.

Yeah I agree it definitely shouldn’t be needed, but as it stands, I have no idea why some times data is missing and a full sync just fixes it :-/

We automate everything on the platform, so do you know if there’s a way via hammer or an api to trigger a full sync for a proxy? If so, I will do this and disable the automatic option (which I wasn’t aware of, so thank you for that)

I would expect both, but I don’t know the exact commands. :smile:

no problem. Hopefully a dev reads this and can confirm :slight_smile:

ah nevermind - found it in here: How to do same things as “Complete Sync” of smartproxy with hammer? - Support - TheForeman

hammer capsule content synchronize --id $CAPSULE_ID --skip-metadata-check true

--skip-metadata-check true = skip the metadata check that turns a sync into an optimized sync = not an optimized sync = complete sync

naming is hard!

yup and works as expected - well it doesn’t (see my other post), but the command itself does!