Commit Graph

49 Commits

Author SHA1 Message Date
Zack Cerza
3d6feb4b60 Merge pull request #151 from ceph/wip-distro-kernel
Wip distro kernel
2013-12-09 13:16:33 -08:00
Sandon Van Ness
478ecc304f Remove unused variable.
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-12-09 11:42:06 -08:00
Sandon Van Ness
ce8ff0a3c8 Added additional comments.
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-12-09 11:35:23 -08:00
Sandon Van Ness
96cfb11b91 Add some debug logging.
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-11-12 13:04:00 -08:00
Sandon Van Ness
f0e01ad0e5 Distro kernel bug-fixes.
Fixed some things that were being done incorrectly.

Some distro kernels have no debug so added | true when disabling
kdb. Also changed what was skipping kernels if non-ubuntu to also
schedule kernel install if a distro kernel.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-11-08 14:35:51 -08:00
Sandon Van Ness
84d8b49f63 Initial ugly commit.
Definitely some enhancements can be done. I think I have everything
needed but I have not been able to test this yet. If this needs to
get done before I am back feel free to work on it.

Completely untested and probably a few mistakes somewhere...

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-10-30 17:06:14 -07:00
Warren Usui
a1d8225b7d Added docstrings, and improved some of the comments on several tasks. 2013-10-12 01:35:34 -07:00
Alfredo Deza
3e75cf3b89 fix an undefined name buy importing config
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
2013-09-24 12:39:43 -04:00
Zack Cerza
e6040f7887 Don't hardcode ceph.com mirror for linux-firmware 2013-09-20 15:53:00 -05:00
Zack Cerza
3981a8f1af Never use 'except:' without specifying an Exception. 2013-08-30 11:10:05 -05:00
Sage Weil
e625316d02 kernel: fix sha1
6f8910eca4 inadvertantly started
using the ceph sha1 for the kernel.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-16 22:34:26 -07:00
Warren Usui
694cd67048 Fix ARM releases to be quantal armv7l releases.
Made grub execution conditional and not done when ARM.
Use ctx parameter to change machine type to tala.
Fix kernel assignments when running ARM systems.

Fixes: #5000
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2013-08-16 15:44:54 -07:00
Warren Usui
47224f2da3 Revert "Fix ARM releases to be quantal armv7l releases."
This reverts commit aabfabc34c.
2013-08-16 15:01:01 -07:00
Warren Usui
aabfabc34c Fix ARM releases to be quantal armv7l releases.
Made grub execution conditional and not done when ARM.
Use ctx parameter to change machine type to tala.
Fix kernel assignments when running ARM systems.

Fixes: #5000
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2013-08-16 14:39:00 -07:00
Dan Mick
52aec32a7d kernel.py: put submenu name in 01_ceph_kernel if necessary
We had been writing 01_ceph_kernel with the kernel title, and
relying on the fact that grub.cfg would never have submenus in it
(implemented by a hack to /etc/grub.d/10_linux which neutered its
submenu creation).  However, that hack was modifying a package file,
and got in the way of later apt commands.  Rather than doing it
that way, this divines the title of the submenu and sets the
default variable to "submenu>kernel", which works to select the
desired kernel.

It depends on there being only one level of submenu, and on the
format of the menuentry and submenu commands, dictated by grub2.
None of this is likely to work at all outside Ubuntu.

Fixes: #4496
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-04-11 13:41:45 -07:00
Sandon Van Ness
e2938f4026 Fix for kdb: doesn't work on mira nodes
This is a fix for issue #4677 which was caused by kdb output being
hard-coded to ttyS1 which is fine for all our hardware except mira
machines. This change just checks to see if mira is in the host's
name and uses ttyS2 instead (simple fix).
2013-04-09 13:12:58 -07:00
Josh Durgin
57bb434def Fix errors found by pyflakes
A bunch of unused imports and variables.
2012-09-21 16:46:24 -07:00
Sage Weil
e4e239e268 kernel: push a local .deb instead of using gitbuilder
This lets you specify a path to an existing kernel deb
to be pushed and installed on the remote node.

Limitations:
 - We don't build the deb for you.  figuring out what
   filename 'make deb-pkg' is building is annoying.
 - We need to be able to figure out the sha1 from the provided
   path.  It shouldn't be a problem, given the way make deb-pkg
   names the debs.
2012-07-29 12:40:13 -07:00
Sage Weil
f37214e114 kernel: fix kernel installation when kdb: is specified
This normalize check would only trigger if a *single* key was specified.
Change it so that it triggers as long as all keys are in the list of valid
keys. This lets us specify both kdb: true and a sha1/branch/tag.

Phew!
2012-07-13 13:57:22 -07:00
Sage Weil
286e639782 kernel: enable/disable kdb
This hard-codes ttyS1, which is what we use on sepia.
2012-06-19 17:24:01 -07:00
Dan Mick
af4fe154d8 Change hardcoded oneiric to precise
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-05-31 17:09:20 -07:00
Sage Weil
396d1feff9 ceph.newdream.net -> ceph.com 2012-05-05 09:30:41 -07:00
Sage Weil
1ac5554d75 kernel: kludge around mysterious 0-byte .git/HEAD files
No idea where these are coming from, but they break nodes with behavior
like

ubuntu@plana08:~$ sudo install -d -m0755 /lib/firmware/updates && cd /lib/firmware/updates && sudo git init
Reinitialized existing Git repository in /lib/firmware/updates/.git/
ubuntu@plana08:/lib/firmware/updates$ sudo git --git-dir=/lib/firmware/updates/.git config --get remote.origin.url >/dev/null || sudo git --git-dir=/lib/firmware/updates/.git remote add origin git://ceph.newdream.net/git/linux-firmware.git
ubuntu@plana08:/lib/firmware/updates$ cd /lib/firmware/updates && sudo git pull origin master
fatal: Not a git repository (or any of the parent directories): .git

where the .git directory looks like

total 32
drwxr-xr-x 7 root root 4096 2012-04-10 12:52 .
drwxr-xr-x 3 root root 4096 2012-04-06 13:54 ..
drwxr-xr-x 2 root root 4096 2012-04-06 13:54 branches
-rwxr--r-- 1 root root  236 2012-04-10 11:33 config
-rw-r--r-- 1 root root    0 2012-04-10 12:52 config.lock
-rw-r--r-- 1 root root    0 2012-04-06 13:54 description
-rw-r--r-- 1 root root    0 2012-04-06 13:54 FETCH_HEAD
-rw-r--r-- 1 root root    0 2012-04-06 13:54 HEAD
drwxr-xr-x 2 root root 4096 2012-04-06 13:54 hooks
drwxr-xr-x 2 root root 4096 2012-04-06 13:54 info
drwxr-xr-x 4 root root 4096 2012-04-06 13:54 objects
drwxr-xr-x 4 root root 4096 2012-04-06 13:54 refs

Hopefully someone can figure out what is causing this and revert this
later.
2012-04-10 13:41:16 -07:00
Sage Weil
0d5918f8e4 kernel: reset to remote firmware branch; don't pull
Pull might merge if upstream rebases.  Just make our branch match the
remote one.
2012-04-10 09:17:24 -07:00
Sage Weil
9b755fd665 kernel: change git incantation for firmware pull
The 'git pull <uri>' seemed to consistently fail on some nodes.  Can't be
sure this was really the problem with them all down now, but this is more
common, and works.
2012-04-10 09:12:01 -07:00
Dan Mick
9906d5ed08 Change to local mirror of linux-firmware repo to try to stop failures 2012-04-09 16:58:59 -07:00
Mark Nelson
3d7f1db731 Kernel: Pull linux-firmware from git
Signed-off-by: Mark Nelson <nhm@clusterfaq.org>
2012-04-05 08:49:19 -07:00
Sage Weil
1a01ccaafb Pull from new gitbuilder.ceph.com locations.
Simplifies the flavor stuff into a tuple of

<package,type,flavor,dist,arch>

where package is ceph, kenrel, etc.
type is tarball, deb
flavor is basic, gcov, notcmalloc
arch is x86_64, i686 (uname -m)
dist is oneiric, etc. (lsb_release -s -c)
2012-03-13 10:02:26 -07:00
Josh Durgin
29885f3e42 kernel: ignore connection problems while waiting for reboot 2012-01-18 17:49:05 -08:00
Josh Durgin
96e89d30ec kernel: loop reconnecting in case we race with shutdown
Previously, if we reconnected before shutdown completed we asserted
that the kernel did not boot into the new version, when we just needed
to wait for the machine to reboot.
2012-01-12 13:02:22 -08:00
Tommi Virtanen
a2372fce12 Move orchestra to teuthology.orchestra so there's just one top-level package. 2011-09-13 14:53:02 -07:00
Josh Durgin
ec768ba3ca Fix pyflakes warnings. 2011-08-31 14:36:01 -07:00
Greg Farnum
0139323e51 Merge branch 'wip-nuke'
Conflicts:
	teuthology/task/kernel.py
2011-08-10 16:16:25 -07:00
Greg Farnum
b5859f877a Move reconnect function from kernel task to misc.py
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-10 14:37:24 -07:00
Tommi Virtanen
7fd798a347 Configure grub to default to the right kernel, not the greatest installed one.
This is sticky; that is, even if you install other kernels (manually/via fab/etc),
grub will keep booting up the one that was last enabled via teuthology config.
Use teuthology to switch kernels and it'll just work.

If the kernel the grub default points to is removed, grub will fall back to
booting the kernel with the greatest version number.

Closes: http://tracker.newdream.net/issues/1364
2011-08-10 13:40:00 -07:00
Tommi Virtanen
39e22e4c0a Handle socket.timeout when waiting for a reconnect.
Now it gets ignored, just like the other harmless socket errors.
2011-08-10 13:22:14 -07:00
Tommi Virtanen
742109f4d9 Wait up to 300 seconds for a reboot.
At least sepia86 was reliably slower than the previous 180 second default.
2011-08-10 13:21:39 -07:00
Greg Farnum
a1f3cac0b6 kernel: comment reconnect task, clean up reporting
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-10 09:07:48 -07:00
Josh Durgin
f38c3697fd kernel: install in parallel 2011-08-05 11:17:28 -07:00
Josh Durgin
f66c010ef5 kernel: debug weird socket exceptions 2011-08-05 11:08:02 -07:00
Josh Durgin
6df0d71abf kernel: reboot immediately after installing
This hides the latency of rebooting when installing on many machines.
2011-08-05 11:07:40 -07:00
Josh Durgin
271e066d6c Connect without using any known_hosts files. 2011-07-19 17:13:13 -07:00
Josh Durgin
5fadb1c11c Whitespace and style cleanup. 2011-07-11 18:07:37 -07:00
Josh Durgin
003492a2d5 Retry connecting based on more error codes. 2011-07-05 13:48:26 -07:00
Josh Durgin
effee7ffc6 Make kernel a separate entity outside of tasks.
It is run before anything other than checking for conflicts.
This way it can't step on the connections used by other tasks,
or clobber test files in /tmp when rebooting.
2011-06-30 16:05:53 -07:00
Josh Durgin
4b1d536ab9 Don't recreate ctx.cluster when reconnecting after installing kernels. 2011-06-30 15:51:09 -07:00
Josh Durgin
6f86de4423 Save kernel version in summary instead of a separate file. 2011-06-30 15:48:43 -07:00
Josh Durgin
7b1b332264 Kernel task does not need to be a context manager. 2011-06-30 15:47:54 -07:00
Josh Durgin
79956538a4 Add kernel task for controlling kernel version for different roles. 2011-06-28 14:51:11 -07:00