Delete content on smart proxy

Problem:
I’m using foreman with 10 smart proxies.
when I’m doing a complete sync, the amount in pulp content is different by several 100GB. on each smart proxy.

Expected outcome:
to have the same content on all smart proxies

Foreman and Proxy versions:
versions are on all SP the same 3.0.1

how can I delete all unnecessary data on smart proxy?

thank you
Alex

foreman-server:

rpm -qa | egrep “katello|pulp” | sort

foreman-installer-katello-3.0.1-1.el7.noarch
katello-4.2.1-1.el7.noarch
katello-certs-tools-2.8.0-1.el7.noarch
katello-client-bootstrap-1.7.7-1.el7.noarch
katello-common-4.2.1-1.el7.noarch
katello-debug-4.2.1-1.el7.noarch
katello-default-ca-1.0-1.noarch
katello-repos-4.2.1-1.el7.noarch
katello-selinux-4.0.2-1.el7.noarch
katello-server-ca-1.0-3.noarch
pulp-client-1.0-1.noarch
pulpcore-selinux-1.2.6-2.el7.x86_64
python3-pulp-2to3-migration-0.12.0-2.el7.noarch
python3-pulp-ansible-0.9.0-2.el7.noarch
python3-pulp-certguard-1.4.0-3.el7.noarch
python3-pulp-container-2.8.1-0.2.el7.noarch
python3-pulpcore-3.14.8-2.el7.noarch
python3-pulp-deb-2.14.1-2.el7.noarch
python3-pulp-file-1.8.2-2.el7.noarch
python3-pulp-rpm-3.14.6-2.el7.noarch
qpid_router_katello_agent-qpid-router-client-1.0-1.noarch
tfm-rubygem-hammer_cli_katello-1.1.2-1.el7.noarch
tfm-rubygem-katello-4.2.1-1.el7.noarch
tfm-rubygem-pulp_ansible_client-0.8.0-1.el7.noarch
tfm-rubygem-pulp_certguard_client-1.4.0-1.el7.noarch
tfm-rubygem-pulp_container_client-2.7.0-1.el7.noarch
tfm-rubygem-pulpcore_client-3.14.1-1.el7.noarch
tfm-rubygem-pulp_deb_client-2.13.0-1.el7.noarch
tfm-rubygem-pulp_file_client-1.8.1-1.el7.noarch
tfm-rubygem-pulp_python_client-3.4.0-1.el7.noarch
tfm-rubygem-pulp_rpm_client-3.13.3-1.el7.noarch
tfm-rubygem-smart_proxy_pulp-3.1.0-1.fm2_6.el7.noarch

smart-proxy:

rpm -qa | egrep “katello|pulp” | sort

foreman-installer-katello-3.0.1-1.el7.noarch
katello-ca-consumer-atgrzsl8135.avl01.avlcorp.lan-1.0-2.noarch
katello-certs-tools-2.8.0-1.el7.noarch
katello-client-bootstrap-1.7.7-1.el7.noarch
katello-common-4.2.1-1.el7.noarch
katello-debug-4.2.1-1.el7.noarch
katello-default-ca-1.0-1.noarch
katello-repos-4.2.1-1.el7.noarch
katello-selinux-4.0.2-1.el7.noarch
katello-server-ca-1.0-3.noarch
pulp-deb-plugins-1.10.2-1.el7.noarch
pulp-docker-plugins-3.2.9-1.el7.noarch
pulp-puppet-plugins-2.21.5-1.el7.noarch
pulp-rpm-plugins-2.21.5-1.el7.noarch
pulp-selinux-2.21.5-1.el7.noarch
pulp-server-2.21.5-1.el7.noarch
python3-pulp-ansible-0.9.0-2.el7.noarch
python3-pulp-certguard-1.4.0-3.el7.noarch
python3-pulp-container-2.8.1-0.2.el7.noarch
python3-pulpcore-3.14.8-2.el7.noarch
python3-pulp-deb-2.14.1-2.el7.noarch
python3-pulp-file-1.8.2-2.el7.noarch
python3-pulp-rpm-3.14.6-2.el7.noarch
python-pulp-common-2.21.5-1.el7.noarch
python-pulp-deb-common-1.10.2-1.el7.noarch
python-pulp-docker-common-3.2.9-1.el7.noarch
python-pulp-oid_validation-2.21.5-1.el7.noarch
python-pulp-puppet-common-2.21.5-1.el7.noarch
python-pulp-repoauth-2.21.5-1.el7.noarch
python-pulp-rpm-common-2.21.5-1.el7.noarch
python-pulp-streamer-2.21.5-1.el7.noarch
tfm-rubygem-smart_proxy_pulp-3.1.0-1.fm2_6.el7.noarch

I just saw, on one SP I get the message, but not on the others:

This repository uses features which are incompatible with ‘mirror’ sync. Please sync without mirroring enabled.This repository uses features which are incompatible with ‘mirror’ sync. Please sync without mirroring enabled.This repository uses features which are incompatible with ‘mirror’ sync. Please sync without mirroring enabled.

any idea?

this is what I did now…

  • removed the oldest files from /var/lib/pulp/media/artifact/
  • http --cert /etc/pki/katello/certs/pulp-client.crt --cert-key /etc/pki/katello/private/pulp-client.key --form POST https://smart-proxy/pulp/api/v3/repair/
  • complete sync

not sure if this is the right way, but it solved my problems

1 Like

why nobody is answering to my threads?
am I doing something wrong? :thinking:

I see your posts and was glad you had posted a solution.
Do you need something else?
To me it seems you resolved it faster than anyone could help you…

Running a “Complete Sync” vs. “Optimized Sync” doesn’t make a different to what is actually available locally on the proxy.

The relevant setting would be the download policy which is “On Demand” by default, i.e. differences in allocated disk space on the proxies is very likely.

Hi!

The question is still here. My master server uses about 200G for Pulp storage. My smart proxy uses about 400G. How to reclaim the smart proxy space?

Using “Reclaim Space”?

1 Like

Reclaim space helps.

There are 3 steps:

  • Switch proxy server to “On demand” mode
  • Synchronize using “Reclaim Space”
  • Switch proxy back to “Immediate”

Thank you for your help!

2 Likes