Feature #3360

Add a yum clean all button if update fails

Added by Filippo Carletti over 5 years ago. Updated over 5 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-base
Target version:v6.7
Resolution: NEEDINFO:No

Description

It happened to me more than once that installing a new packages or applying an update from Software Center fails with a yum message like:
[NoMoreMirrorsRepoError] failure: repodata/f4af86579bbc4046548439a431002cd77e159625460b29d54097d90d5d851d9e-filelists.sqlite.bz2 from nethesis-updates: [Errno 256] No more mirrors to try.

I open the command line, issue a "yum clean all" and retry the Software center install: it succeeds 99% of the times.

So, I'd like to have a button named something like "Clean yum cache", with instruction to click the button and retry.

Associated revisions

Revision 5b9e75eb
Added by Davide Principi over 5 years ago

Software center: added clear YUM cache button. Refs #3360

Revision 0e7263a0
Added by Davide Principi over 5 years ago

Added description to Clear YUM cache button. Refs #3360

Revision 2bf89475
Added by Davide Principi over 5 years ago

Show the clean cache button on updates-check. Refs #3360

Revision aa5bddc2
Added by Giacomo Sanchietti over 5 years ago

Enhance yum error message. Refs #3360

Revision 0c4909c1
Added by Davide Principi over 5 years ago

Software center: added clear YUM cache button. Refs #3360

Revision 2d5b9b60
Added by Davide Principi over 5 years ago

Added description to Clear YUM cache button. Refs #3360

Revision 67a39a9e
Added by Davide Principi over 5 years ago

Show the clean cache button on updates-check. Refs #3360

Revision 3e550825
Added by Giacomo Sanchietti over 5 years ago

Enhance yum error message. Refs #3360

History

#1 Updated by Filippo Carletti over 5 years ago

Instructions text could be:
The install/update may have failed due to caching issues. Please try to clean the cache clicking the button below and retry the install/update operation.

#2 Updated by Davide Principi over 5 years ago

  • Status changed from NEW to TRIAGED
  • Assignee set to Davide Principi
  • % Done changed from 0 to 20

#3 Updated by Davide Principi over 5 years ago

  • Status changed from TRIAGED to ON_DEV
  • % Done changed from 20 to 30

#4 Updated by Davide Principi over 5 years ago

  • Status changed from ON_DEV to MODIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 30 to 60

[I don't exactly know how to reproduce a cache problem condition]

Test case 1

  • Tamper with yum cache
    find /var/cache/yum/x86_64/6/ -name 'repomd.xml' | xargs -- sed -i '/sqlite/ s|repodata/|repodata/xx|'
    
  • Reload Software center page
  • The "Clear YUM cache button" should fix the issue

Test case 2

This is not a real test case. I'd rather say it documents the second case where an error might occur.

You must change the code to raise this error condition:

--- /usr/share/nethesis/NethServer/Module/PackageManager/Review.php.orig    2016-03-01 12:08:02.021160237 +0100
+++ /usr/share/nethesis/NethServer/Module/PackageManager/Review.php    2016-03-01 12:08:23.211155356 +0100
@@ -72,7 +72,7 @@
         }

         if (count($args) > 0) {
-            $this->getPlatform()->exec('/usr/bin/sudo /sbin/e-smith/pkgaction ${@}', $args, TRUE);
+            $this->getPlatform()->exec('/usr/bin/sudo /sbin/e-smith/pkgaction --install nonexistingpackage ${@}', $args, TRUE);
             //$this->getLog()->warning('/usr/bin/sudo /sbin/e-smith/pkgaction ${@} ' . implode(' ', $args));
         }
     }

#5 Updated by Davide Principi over 5 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70

In nethserver-testing:
nethserver-base-2.9.6-1.4.g2bf8947.ns6.noarch.rpm

#6 Updated by Giacomo Sanchietti over 5 years ago

  • Status changed from ON_QA to VERIFIED
  • % Done changed from 70 to 90

Both test cases passed.

Also pushed translations to Transifex.

VERIFIED

#7 Updated by Giacomo Sanchietti over 5 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
Released in 6.7 updates:
  • nethserver-base-2.9.7-1.ns6.noarch.rpm
  • nethserver-lang-de-1.0.19-1.ns6.noarch.rpm
  • nethserver-lang-el-1.0.19-1.ns6.noarch.rpm
  • nethserver-lang-en-1.0.19-1.ns6.noarch.rpm
  • nethserver-lang-es-1.0.19-1.ns6.noarch.rpm
  • nethserver-lang-fr-1.0.19-1.ns6.noarch.rpm
  • nethserver-lang-hu-1.0.19-1.ns6.noarch.rpm
  • nethserver-lang-it-1.0.19-1.ns6.noarch.rpm
  • nethserver-lang-nl-1.0.19-1.ns6.noarch.rpm
  • nethserver-lang-pt-1.0.19-1.ns6.noarch.rpm
  • nethserver-lang-ru-1.0.19-1.ns6.noarch.rpm
  • nethserver-lang-sv-1.0.19-1.ns6.noarch.rpm
  • nethserver-lang-tr-1.0.19-1.ns6.noarch.rpm
Released in 7 updates:
  • nethserver-base-2.9.7-1.70.g6d24a00.ns7.noarch.rpm
  • nethserver-lang-de-1.0.19-1.ns7.noarch.rpm
  • nethserver-lang-el-1.0.19-1.ns7.noarch.rpm
  • nethserver-lang-en-1.0.19-1.ns7.noarch.rpm
  • nethserver-lang-es-1.0.19-1.ns7.noarch.rpm
  • nethserver-lang-fr-1.0.19-1.ns7.noarch.rpm
  • nethserver-lang-hu-1.0.19-1.ns7.noarch.rpm
  • nethserver-lang-it-1.0.19-1.ns7.noarch.rpm
  • nethserver-lang-nl-1.0.19-1.ns7.noarch.rpm
  • nethserver-lang-pt-1.0.19-1.ns7.noarch.rpm
  • nethserver-lang-ru-1.0.19-1.ns7.noarch.rpm
  • nethserver-lang-sv-1.0.19-1.ns7.noarch.rpm
  • nethserver-lang-tr-1.0.19-1.ns7.noarch.rpm

Also available in: Atom PDF