Auto sync of smart proxies not starting

Problem:
I have problem with auto synchronization of smart proxies. I can not see any running tasks, despite fact that I published and promoted new version of content view.

Of cource, I have got enabled this option in

Administer → Settings → Content → Sync Smart Proxies after Content View promotion

Manual synchronization is working

Foreman and Proxy versions:
Foreman 2.5.1
Katello 4.1

same with
Katello 4.0.1.2
Foreman 2.4.1

Does the sync task get created and fail, or is no task created at all in the first place? (I see that you said “no running tasks” - but I am not sure if that means a task was created, or just wasn’t run.)

no Task got created

i’ve tried CCV and CV
the Proxy got the correct LE

Manual Sync is fine

Very unusual! Do you detect any error messages in the Katello log?

One other step to try to is to add a filter (to exclude a package for example) to force a change in the CV. Then see if the sync occurs.

I have the same problem. Sync with old pulp2 content proxy was fine. With new pulp3 content proxy it doesn’t sync. I have to start the sync manually. Last time this morning. There were some new packages available for which I published and promoted my CVs.

There aren’t any errors in production.log. Only some warning messages:

Scoped order is ignored, it's forced to be batch order.

although I am not sure if they are really related. This message pops up every 30 minutes at :00 and :30. But it seems after each promote there is another one. Other than that. There are not errors which are obviously related to the promotion/proxy sync.

One of the changes was to optimize syncing so the operation is invoked when changes are detected. I’m assuming that in these cases, what we are seeing is that there are changes but the sync still isn’t happening. If that’s not the case, please let us know.

Depends on your definition of “changes”. This morning there were new packages in the repositories. Thus I published and promoted the CVs. Then an hour later I manually synced the content proxy and after that I was able to install those new packages on the clients… I guess, that qualifies as “changes”?

Yeah I would say that would count as changes.

O.K. Then these “changes” didn’t trigger an automatic sync of the content proxy…

Sounds like it did not, which is a problem.

Anything else where I could look for errors?

The katello production logs would be the best source for errors when it comes to problems like a failure in task planning and execution. If it’s a logic error, there may be no messages sent at all.

I will look into this this this week.

no errors in production.log
it seems like the feature is just not working as expected

I just put my production environment back on my old 2.3.5/3.18.3 content proxy and published/promoted a couple of CVs: for the old proxy it works. After promotion to the production environment it starts a task “Sync Content View on Smart Proxy(ies)” which in turn starts “Synchronize smart proxy ‘foreman-proxy.example.com’”.

But nothing for my new content proxy (foreman-content.example.com) which is up-to-date with the latest 4.1.

If there is something to sync to the smart proxy it also shows this on the smart proxy overview page. So basically, foreman knows it needs to be synced but for the pulp3 content proxy it doesn’t schedule the sync task…

@jjeffers the only obvious difference between the old and new content proxy are the active features. Is it possible, that the features get checked to find out whether or not to automatically schedule the sync task and it doesn’t recognized the pulpcore or content_gateway feature for this purpose?

I cracked open a debugger and I think there is a problem.

I opened Bug #33014: Capsule syncing is not triggered by CV promotion - Katello - Foreman.