이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 15. Maintaining Satellite Server
This chapter provides information on how to maintain Satellite Server, including information on how to recover Pulp from a full disk, how to work with audit records, and how to clean unused tasks.
15.1. Deleting audit records manually 링크 복사링크가 클립보드에 복사되었습니다!
You can use the foreman-rake audits:expire command to remove audit records at any time.
Procedure
Delete the audit records using the
foreman-rake audits:expirecommand:# foreman-rake audits:expire days=Number_Of_DaysThis command deletes all audit records older than
Number_Of_Days.
15.2. Deleting audit records automatically 링크 복사링크가 클립보드에 복사되었습니다!
You can automatically delete audit records using the Saved audits interval setting. This setting is empty by default, meaning Satellite does not automatically delete the audit records.
Procedure
- In the Satellite web UI, navigate to Administer > Settings.
- On the General tab, find the Saved audits interval setting.
- Set the value of the setting to the number of days after which you want Satellite to delete the audit records.
15.3. Anonymizing audit records 링크 복사링크가 클립보드에 복사되었습니다!
You can anonymize audit records to remove user account and IP information while preserving the audit trail. This is useful for maintaining compliance with privacy regulations or internal security policies.
Procedure
Use the
foreman-rake audits:anonymizecommand to remove any user account or IP information while maintaining the audit records in the database. You can also use a cron job to schedule anonymizing the audit records at the set interval that you want.By default, using the
foreman-rake audits:anonymizecommand anonymizes audit records that are older than 90 days. You can specify the number of days to keep the audit records by adding the days option and add the number of days.For example, you can anonymize audit records that are older than seven days:
# foreman-rake audits:anonymize days=7
15.4. Deleting report records 링크 복사링크가 클립보드에 복사되었습니다!
You can delete report records to remove old reports from your Satellite. This is useful for maintaining a clean and organized report history.
Report records are created automatically in Satellite.
Procedure
Use the
foreman-rake reports:expirecommand to remove reports at any time. You can also use a cron job to schedule report record deletions at the set interval that you want.By default, using the
foreman-rake reports:expirecommand removes report records that are older than 90 days. You can specify the number of days to keep the report records by adding the days option and add the number of days.For example, you can delete report records that are older than seven days:
# foreman-rake reports:expire days=7
15.5. Configuring the cleaning unused tasks feature 링크 복사링크가 클립보드에 복사되었습니다!
Satellite performs regular cleaning to reduce disc space in the database and limit the rate of disk growth. As a result, Satellite backup completes faster and overall performance is higher.
By default, Satellite executes a cron job that cleans tasks every day at 19:45. Satellite removes the following tasks during the cleaning:
- Tasks that have run successfully and are older than thirty days
- All tasks that are older than a year
You can configure the cleaning unused tasks feature using these options:
To configure the time at which Satellite runs the cron job, set the
--foreman-plugin-tasks-cron-lineparameter to the time you want in cron format. For example, to schedule the cron job to run every day at 15:00, enter the following command:# satellite-installer --foreman-plugin-tasks-cron-line "00 15 * * *"-
To configure the period after which Satellite deletes the tasks, edit the
:rules:section in the/etc/foreman/plugins/foreman-tasks.yamlfile. To disable regular task cleanup on Satellite, enter the following command:
# satellite-installer --foreman-plugin-tasks-automatic-cleanup falseTo reenable regular task cleanup on Satellite, enter the following command:
# satellite-installer --foreman-plugin-tasks-automatic-cleanup true
15.6. Deleting task records 링크 복사링크가 클립보드에 복사되었습니다!
You can delete task records to remove old or unnecessary tasks from your Satellite. This helps maintain system performance and keeps your task history organized.
Task records are created automatically in Satellite.
Procedure
Use the
foreman-rake foreman_tasks:cleanupcommand to remove tasks at any time. You can also use a cron job to schedule Task record deletions at the set interval that you want.For example, you can delete task records from successful repository synchronizations:
# foreman-rake foreman_tasks:cleanup TASK_SEARCH='label = Actions::Katello::Repository::Sync' STATES='stopped'
15.7. Deleting a task by ID 링크 복사링크가 클립보드에 복사되었습니다!
You can delete tasks by ID, for example if you have submitted confidential data by mistake.
Procedure
Connect to your Satellite Server using SSH:
# ssh root@satellite.example.comOptional: View the task:
$ hammer task info --id My_Task_IDDelete the task:
# foreman-rake foreman_tasks:cleanup TASK_SEARCH="id=My_Task_ID"Optional: Ensure the task has been removed from Satellite Server:
$ hammer task info --id My_Task_IDNote that because the task is deleted, this command returns a non-zero exit code.
15.8. Recovering from a full disk 링크 복사링크가 클립보드에 복사되었습니다!
The following procedure describes how to resolve the situation when a logical volume (LV) with the Pulp database on it has no free space.
Procedure
- Let running Pulp tasks finish but do not trigger any new ones as they can fail due to the full disk.
Ensure that the LV with the
/var/lib/pulpdirectory on it has sufficient free space. Here are some ways to achieve that:Remove orphaned content:
# foreman-rake katello:delete_orphaned_content RAILS_ENV=productionThis is run weekly so it will not free much space.
- Change the download policy from Immediate to On Demand for as many repositories as possible and remove already downloaded packages. See the Red Hat Knowledgebase solution How to change syncing policy for Repositories on Satellite from "Immediate" to "On-Demand" on the Red Hat Customer Portal for instructions.
Grow the file system on the LV with the
/var/lib/pulpdirectory on it. For more information, see Growing a logical volume and file system in Red Hat Enterprise Linux 9 Configuring and managing logical volumes.NoteIf you use an untypical file system (other than for example ext3, ext4, or xfs), you might need to unmount the file system so that it is not in use. In that case, complete the following steps:
Stop Satellite services:
# satellite-maintain service stop- Grow the file system on the LV.
Start Satellite services:
# satellite-maintain service start
- If some Pulp tasks failed due to the full disk, run them again.
15.9. Reclaiming PostgreSQL space 링크 복사링크가 클립보드에 복사되었습니다!
The PostgreSQL database can use a large amount of disk space especially in heavily loaded deployments. Use this procedure to reclaim some of this disk space on Satellite.
Procedure
Stop all services, except for the
postgresqlservice:# satellite-maintain service stop --exclude postgresqlSwitch to the
postgresuser and reclaim space on the database:# su - postgres -c 'vacuumdb --full --all'Start the other services when the vacuum completes:
# satellite-maintain service start
15.10. Reclaiming space from on demand repositories 링크 복사링크가 클립보드에 복사되었습니다!
If you set the download policy to on demand, Satellite downloads packages only when the clients request them. You can clean up these packages to reclaim space.
Space reclamation requires an existing repository. For deleted repositories, wait for the next scheduled orphan cleanup or remove orphaned content manually:
# foreman-rake katello:delete_orphaned_content
Procedure
If you want to reclaim space for a single repository:
- In the Satellite web UI, navigate to Content > Products.
- Select a product.
- On the Repositories tab, click the repository name.
- From the Select Actions list, select Reclaim Space.
If you want to reclaim space for multiple repositories:
- In the Satellite web UI, navigate to Content > Products.
- Select the product name.
- On the Repositories tab, select the checkbox of the repositories.
- Click Reclaim Space at the top right corner.
If you want to reclaim space for Capsules:
- In the Satellite web UI, navigate to Infrastructure > Capsules.
- Select the Capsule Server.
- Click Reclaim space.