This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On your Satellite server | |
# foreman-rake console | |
... | |
User.current = User.first | |
ForemanTasks.async_task(::Actions::Katello::Repository::MetadataGenerate, Katello::Repository.where(pulp_id: "Ten_Capsule_Org-Dev-demo-repos-Demo-demo3").first) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This will delete all tasks and associated task data from anything older than | |
# the number of days specified below defaulting to 120 days. | |
DAYS_AGO=120 | |
echo "" | |
echo "DELETING All tasks and associated data from [$DAYS_AGO] days ago" | |
echo "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):002:0> User.current = User.anonymous_admin | |
=> #<User id: 1, login: "foreman_admin", firstname: "Anonymous", lastname: "Admin", mail: nil, admin: true, | |
irb(main):003:0> Katello::Repository.where(id: 1317) | |
=> #<ActiveRecord::Relation [#<Katello::Repository id: 1317, name: "Red Hat Satellite 6.2 for RHEL 7 Server RPMs x86_6 | |
irb(main):004:0> ForemanTasks.sync_task(::Actions::Katello::Repository::MetadataGenerate, Katello::Repository.where(id: 1317).first) | |
=> #<ForemanTasks::Task::DynflowTask id: "5170d237-7c78-46d3-8df9-55790413af92", type: "ForemanTasks::Task::DynflowTask", label: | |
irb(main):005:0> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in $(hammer repository list --organization-id 1 | grep -e "^[[:digit:]]" | awk '{print $1}' | sort -n); do hammer repository update --id $i --download-policy 'on_demand' --organization-id 1; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/candlepin/candlepin.conf | |
candlepin.auth.basic.enable=true | |
candlepin.auth.trusted.enable=true | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for each of such $queue: | |
# rm -rf /var/lib/qpidd/.qpidd/qls/jrnl/${queue} | |
# qpid-config --ssl-certificate=/etc/pki/katello/qpid_client_striped.crt -b amqps://localhost:5671 add queue $queue --durable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongo pulp_database --eval "db.units_distribution.drop();db.units_docker_blob.drop();db.units_docker_image.drop();db.units_docker_manifest.drop();db.units_docker_tag.drop();db.units_drpm.drop();db.units_erratum.drop();db.units_iso.drop();db.units_package_category.drop();db.units_package_environment.drop();db.units_package_group.drop();db.units_puppet_module.drop();db.units_rpm.drop();db.units_srpm.drop();db.units_yum_repo_metadata_file.drop();db.repo_content_units.drop();" | |
mongo pulp_database --eval 'db.repo_importers.update({"scratchpad": {$ne: null}}, {$set: {"scratchpad.repomd_revision": null}}, {"multi":true})' | |
rm -rf /var/lib/pulp/content/units/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Engineering update | |
Here are few items to check before doing the ugprade from 6.2.0 to 6.2.7: | |
1) Verify a qpid queue from 6.1 is actually removed: | |
# qpid-stat -q --ssl-certificate=/etc/pki/katello/qpid_client_striped.crt -b amqps://localhost:5671 | grep event | |
make sure you only see 1 line in that, similar to: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://access.redhat.com/node/208995 | |
# foreman-rake console | |
Loading production environment (Rails 3.2.8) | |
irb(main):001:0> ForemanTasks::Task.where(:state => :planned).where(:label => "Actions::Katello::Repository::Sync").destroy_all | |
irb(main):002:0> ForemanTasks::Task.where(:state => :planned).where(:label => "Actions::Katello::System::GenerateApplicability").destroy_all | |
irb(main):003:0> ForemanTasks::Task.where(:state => :paused).where(:label => "Actions::Host::GenerateApplicability").destroy_all | |
irb(main):004:0> ForemanTasks::Task.where(:label => "Actions::Candlepin::ListenOnCandlepinEvents").destroy_all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters