Having the ability to run scripts before and after all of the main vcld
stages would be useful and provide a great deal of flexibility.  There are
several stages where a pre_<stage> and/or post_<stage> script would be
handy.  The ones I can think of offhand are (including what's currently
available):

   - post_load
      - after OS is loaded and basic configuration is complete
      - before user accounts are added
   - pre_reserve
      - before user accounts are added
      - similar to post_load but would be triggered if a computer was
      preloaded
   - post_reserve
      - after user accounts are added
   - post_grant_access
      - after firewall is configured and locked down
   - pre_sanitize
      - after timeout occurs where user didn't log in
      - before user accounts are removed
      - could be used to revert changes related to user accounts such as
      removing them from some external group or revoking some sort of license
      token specific to a user
      - not called if computer is to be reloaded
   - post_sanitize
      - after user accounts are removed and firewall is locked back down
      - not called if computer is to be reloaded
      - could possibly be used for additional cleanup
   - post_reload
      - just prior to the end of processing a reload request not tied to a
      user reservation
   - post_reservation
      - just prior to the end of a user reservation
   - pre_capture
      - before vcld's pre_capture subroutine is executed
   - post_server_modify
      - after server reservation accounts are modified
      - may need to do something for every user account added/removed
   - pre_reload
      - run prior to a computer being reloaded
      - could be used to remove a computer from an AD domain

I had started working on a related issue some time ago:
https://issues.apache.org/jira/browse/VCL-564

The difference between VCL-564 and this topic is that VCL-564 is admin
controlled versus image creator controlled.  VCL-564 would provide
functionality to store scripts under the management node's tools directory
and have them automatically copied to images of a given OS without having
to save new revisions.  Both VCL-760 and VCL-564 are desirable.  I think
that the stage and script names are used for one should match the other.

On a related note, I think I may have been the one who regrettably chose
/etc/init.d for the directory of these scripts.  This is not a proper
directory as /etc/init.d should only contain service control scripts.  I
would like to change the recommended directory to something like
/usr/local/vcl, but leave in backwards compatibility so the existing
scripts run.  Thoughts?

-Andy




On Wed, May 14, 2014 at 10:35 AM, Aaron Peeler <[email protected]> wrote:

> Hi Dev community.
>
> Regarding this jira issue.
> https://issues.apache.org/jira/browse/VCL-760
>
> Recently we had a need to do some post action on an image/environment
> after the reservation had completed. Also think there had been some
> previous requests for similar action.
>
> Sdding a vcl_post_reservation script option would address this easily.
> This would be similar to the vcl_post_load and vcl_post_reserve
> scripts detailed here: http://vcl.apache.org/docs/vclPostScripts.html
>
> While inserting the code for this. I was thinking if other vcl states
> need to also run this vcl_post_reservation script. Like the timeout
> case.
>
> i.e. A user makes a reservation, hits the connect button but does not
> connect to the machine. In normal reservations the machine does not
> get reloaded, the OS is just sanitized. Does it make sense to also run
> a vcl_post_reservation script here (if it exists in the image)?
>
> Thoughts if any?
> If none, I'll just proceed to only trigger the vcl_post_reservation
> script (if exists) for reservations that proceeded into the inuse
> state or are considered dirty.
>
> Thanks,
> Aaron
>
>
> On Tue, May 13, 2014 at 2:18 PM, Aaron Peeler (JIRA) <[email protected]>
> wrote:
> > Aaron Peeler created VCL-760:
> > --------------------------------
> >
> >              Summary: add a vcl post reservation script
> >                  Key: VCL-760
> >                  URL: https://issues.apache.org/jira/browse/VCL-760
> >              Project: VCL
> >           Issue Type: Improvement
> >           Components: vcld (backend)
> >             Reporter: Aaron Peeler
> >             Priority: Minor
> >              Fix For: 2.3.3, 2.4
> >
> >
> > add a call to a vcl_post_inuse script that if existed could be run when
> a reservation is ended or over. The script is to be similar to the
> vcl_post_load and vcl_post_reserve scripts.
> >
> > Possible use case is to unregister a machine from a larger service
> before turning off / reloading.
> >
> >
> >
> > --
> > This message was sent by Atlassian JIRA
> > (v6.2#6252)
>
>
>
> --
> Aaron Peeler
> Program Manager
> Virtual Computing Lab
> NC State University
>
> All electronic mail messages in connection with State business which
> are sent to or received by this account are subject to the NC Public
> Records Law and may be disclosed to third parties.
>

Reply via email to