Ignore:
Timestamp:
Aug 11, 2009, 10:38:42 PM (15 years ago)
Author:
broder
Message:

In invirt-remote:

  • Instead of running all of the disk-wiping dds simultaneously, run them sequentially using a janitor daemon (LP: #411486).
Location:
trunk/packages/invirt-remote
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-remote/debian/changelog

    r2351 r2436  
     1invirt-remote (0.4.0) unstable; urgency=low
     2
     3  * Instead of running all of the disk-wiping dds simultaneously, run them
     4    sequentially using a janitor daemon (LP: #411486).
     5
     6 -- Evan Broder <broder@mit.edu>  Tue, 11 Aug 2009 19:37:55 -0700
     7
    18invirt-remote (0.3.15) unstable; urgency=low
    29
  • trunk/packages/invirt-remote/debian/control

    r2286 r2436  
    2222Package: invirt-remote-host
    2323Architecture: all
    24 Depends: ${misc:Depends}, remctl-server, invirt-console-host,
    25  invirt-vnc-server, python-cjson, python-yaml, util-linux
     24Depends: ${misc:Depends}, daemon, remctl-server, invirt-console-host,
     25 invirt-vnc-server, python-cjson, python-pyinotify, python-yaml,
     26 util-linux
    2627Description: Installs the Invirt host remctl configuration
    2728 This is the remctl configuration for an Invirt host. It allows any
  • trunk/packages/invirt-remote/debian/invirt-remote-host.init

    r1822 r2436  
    2121}
    2222
    23 case "$1" in
    24   start|reload|force-reload|restart)
     23reload_cfg()
     24{
    2525    log_begin_msg "Reloading config for $PACKAGE"
    2626    gen_config
    2727    log_end_msg $?
    2828    invoke-rc.d openbsd-inetd start # returns 1 if inetd is running
    29     [ $? -eq 1 ] && exit 0
     29}
     30
     31case "$1" in
     32  start)
     33    reload_cfg
     34
     35    log_begin_msg "Starting the invirt-janitor for $PACKAGE"
     36    daemon -n invirt-janitor -r invirt-janitor
     37    log_end_msg $?
     38    ;;
     39  force-reload|restart)
     40    reload_cfg
     41
     42    log_begin_msg "Restarting the invirt-janitor for $PACKAGE"
     43    daemon -n invirt-janitor --restart
     44    log_end_msg $?
    3045    ;;
    3146  stop)
     47    log_begin_msg "Stopping the invirt-janitor for $PACKAGE"
     48    daemon -n invirt-janitor --stop
     49    log_end_msg $?
    3250    ;;
    3351  *)
    34     log_success_msg "Usage: /etc/init.d/$PACKAGE {start|reload|force-reload|restart|stop}"
     52    log_success_msg "Usage: /etc/init.d/$PACKAGE {start|force-reload|restart|stop}"
    3553    ;;
    3654esac
  • trunk/packages/invirt-remote/host/usr/sbin/invirt-lvm

    r2345 r2436  
    6464    ensureoff(machine)
    6565   
    66     # Fork. The child process wipes the LV and then deletes
    67     # it. There's not really anything sane to do with errors (since
    68     # this is running non-interactively), so let's just drop them on
    69     # the floor for now.
    70     if os.fork() == 0:
    71         call(["/usr/bin/ionice", "-c", "2", "-n", "7", "/bin/dd", "if=/dev/zero", "of=%s" % new_lvpath])
    72         call(["/sbin/lvchange", "-a", "n", new_lvpath])
    73         call(["/sbin/lvchange", "-a", "ey", new_lvpath])
    74         call(["/sbin/lvremove", "--force", new_lvpath])
     66    # Touch a file corresponding to the new name of the LV; a separate
     67    # daemon will handle wiping and deleting it.
     68    open(os.path.join('/var/lib/invirt-remote/cleanup', new_lvname), 'w')
    7569elif subcommand == "lvresize":
    7670    size = sys.argv[4]
Note: See TracChangeset for help on using the changeset viewer.