How to do same things as "Complete Sync" of smartproxy with hammer?

I have noticed that hammer content sync does not do a “complete sync” it basically does the same thing as the ‘optimized sync’ in the gui.

Many times, we have content missing and find that only a complete sync of the smartproxy will fix the issue.

I want to be able to kick off a complete sync via the CLI, but there seems to be no additional options in hammer to do this.

Am I missing something?

1 Like

This should do it:

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

The complete sync is a little weirdly named now that I think about it. What it does is doesn’t try to look at metadata to figure out if anything changed and runs a complete sync.

1 Like

Ok, that makes sense that will make it do the same thing.

Although it does seem like maybe a --complete-sync option or something might make more sense for people.

1 Like

@sajha I believe on the Pulp side the option is called optimize and is true by default. A complete sync is one with optimize=false. So every layer seems to have its own naming for this! :face_with_diagonal_mouth:

1 Like

Ya…We do this in katello when we pass it to pulp:

sync_options[:optimize] = false if sync_options[:skip_metadata_check]

PR in foreman-documentation: Run complete sync to Smart Proxy Server via CLI by maximiliankolb · Pull Request #2664 · theforeman/foreman-documentation · GitHub