--- Description of problem: Koji should perform a quick check of the booted filesystem to make sure it's readable and writable before taking on new tasks. --- Version-Release number of selected component (if applicable): All --- How reproducible: Remount the root filesystem as read-only and watch it take on tasks? --- Example patch: $ diff -u ~/tmp/koji-1.6.0/koji/daemon.py ~/Desktop/temp/koji-1.6.0/koji/daemon.py --- /home/jchiappetta/tmp/koji-1.6.0/koji/daemon.py 2010-12-16 16:13:17.000000000 -0500 +++ /home/jchiappetta/Desktop/temp/koji-1.6.0/koji/daemon.py 2012-08-07 16:26:06.311797605 -0400 @@ -976,6 +976,31 @@ self.status = "Insufficient disk space: %i MB, %i MB required" % (availableMB, self.options.minspace) self.logger.warn(self.status) return False + try: + f = open("/proc/mounts", "r") + except: + pass + while (1): + try: + l = f.readline() + except: + break + if (not l): + break + l = l.strip() + m = l.split(" ") + if (len(m) < 4): + continue + if (m[0][0:1] != "/"): + continue + o = m[3].split(",") + if (o[0] != "rw"): + self.logger.warn("Possible read-only fs : [%s %s %s %s]" % (m[0], m[1], m[2], o[0])) + return False + try: + f.close() + except: + pass return True def readyForTask(self):
I do not think it is a good idea to assert that all mounts be rw. In fact, the normal configuration for most builders is to have /mnt/koji as ro. We can probably improve the sanity checks a bit, but this is way too specific to problems encountered in an esoteric setup. Koji simply cannot be expected to exhaustively validate the host it is running on. Would you subject any other service daemon to this standard?
I admit my example patch is a little over-assuming as not all mounts need to be rw, however, all I'm saying is that Koji will accept and fail new tasks when the parts it needs are mounted as ro. I think it should quickly check/touch the filesystem first before accepting a new task at least or else it's just a massively misbehaving builder that is constantly failing tasks... Just my opinion I guess.
This is one particular type of server misconfiguration that can cause builds to fail without causing kojid to die. There are many others. We cannot possibly check for them all, or even a significant fraction. As I said, I am open to beefing up the sanity checks. Checking that /var/lib/mock is writable is certainly reasonable (we already check that it exists and has sufficient space). I suppose we could check for the existence of key utilities (e.g. mock) before we run them.
This message is a reminder that Fedora 17 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 17. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '17'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 17's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 17 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior to Fedora 17's end of life. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed.