#720 [frontend] automatize outdated chroots notifications and deletion
Merged 4 years ago by frostyx. Opened 4 years ago by frostyx.
copr/ frostyx/copr automatize-outdated-chroots  into  master

@@ -14,6 +14,8 @@ 

  outdated and going to be deleted in the future, and lastly how to actually delete them.

  

  

+ .. _mark_chroot_as_outdated:

+ 

  Mark chroot as outdated

  -----------------------

  
@@ -82,3 +84,12 @@ 

  When deleting the chroot (creating an action to delete the data on the backend), the ``delete_after``

  and ``delete_notify`` columns are set to NULL and therefore ``notify_outdated_chroots``

  and ``delete_outdated_chroots`` commands don't see the chroot anymore.

+ 

+ 

+ Automatization

+ --------------

+ 

+ This whole article is mainly for understanding how notifications and deletion of outdated

+ chroots work in order to debug or rework it. The only thing, that Copr administrator needs

+ to do manually is :ref:`mark_chroot_as_outdated`, everything else is achieved by a daily

+ cron script. See ``/etc/cron.daily/copr-frontend-optional``.

@@ -0,0 +1,6 @@ 

+ #! /bin/sh

+ 

+ # Optional Copr frontend tasks to be executed daily.

+ 

+ #runuser -c 'copr-frontend notify_outdated_chroots' - copr-fe

+ #runuser -c 'copr-frontend delete_outdated_chroots' - copr-fe

@@ -330,6 +330,7 @@ 

  %config %attr(0755, root, root) %{_sysconfdir}/cron.hourly/copr-frontend

  %config %attr(0755, root, root) %{_sysconfdir}/cron.daily/copr-frontend

  %config(noreplace) %attr(0755, root, root) %{_sysconfdir}/cron.hourly/copr-frontend-optional

+ %config(noreplace) %attr(0755, root, root) %{_sysconfdir}/cron.daily/copr-frontend-optional

  %exclude_files flavor

  %exclude_files devel

  

I've created the cron.daily/copr-frontend-optional in the same way as we have cron.hourly/copr-frontend-optional.

1 new commit added

  • [doc] describe outdated chroots automatization
4 years ago

rebased onto 357c2d51e8e394577b233b0caf7cdccc6d91e938

4 years ago

2 new commits added

  • [doc] describe outdated chroots automatization
  • [frontend] automatize outdated chroots notifications and deletion
4 years ago

rebased onto cfd30897e9c37be541512fb4a49642be74efd338

4 years ago

rebased onto cfd30897e9c37be541512fb4a49642be74efd338

4 years ago

rebased onto afd9dfe

4 years ago

Pull-Request has been merged by frostyx

4 years ago