Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
emulab-devel
emulab-devel
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 111
    • Issues 111
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 4
    • Merge Requests 4
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • emulab
  • emulab-develemulab-devel
  • Issues
  • #311

Closed
Open
Opened Jul 05, 2017 by Mike Hibler@hibler
  • Report abuse
  • New issue
Report abuse New issue

On the destructive tendencies of `prepare`

This is prompted most recently by issue #303 (closed), but we (well, me anyway) have long had concerns about whether a node we take an image of, should come back up afterward as though nothing had happened. This behavior is at odds with the desire to have all experiment and even cluster specific state removed from the image being taken.

A great deal of what we remove/undo in the prepare script prior to taking an image gets replaced by our startup scripts when the node comes back up, but not everything. Basically, any one-time action done by slicefix at swapin time (as opposed to done every reboot by the startup scripts) is a potential problem.

The current bugaboo is the cleaning of SSH state from an image. If we remove the host keys (/etc/ssh/ssh_host_*) then at the next reboot, the node will either generate new host keys (FreeBSD) or wind up with no host keys (Linux, at least Ubuntu). The latter is particularly bad because then even boss root cannot ssh into the node.

On numerous occasions we have declared this destructive behavior to be okay, based on our typical usage of swapping in single node experiments for the express purpose of creating a new image and then swapping them out afterward.

But this is not a desirable behavior when it is a user snapshoting one or more nodes for the purposes of checkpointing or creating a backup and then continuing on. However, I have only circumstantial evidence that people actually do this (e.g., the presence of a user image with 100+ versions, created frequently).

One compromise position here would be to have a "prepare harder" option that we only use when we are creating images for export to other sites. That is, only use this option when updating system images. The normal prepare mode will avoid these destructive behaviors. Really though, we would have to do it for any image that is "global" to avoid "trojan images". (See the whole Alice/Bob thing in #303 (closed)).

Thoughts?

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
1
Labels
status:proposed
Assign labels
  • View project labels
Reference: emulab/emulab-devel#311