Socket
Book a DemoInstallSign in
Socket

wait-for-zone

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wait-for-zone

Wait for a SmartOS zone to become fully available

latest
npmnpm
Version
0.1.1
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

wait-for-zone

Wait for a SmartOS zone to become fully available.

You thought that waiting for a zone to provision was as simple as waiting for vmadm create to exit? Nope. As it turns out, after being provisioned by vmadm and vmadmd, each zone is set to be "finalized" by zoneinit.

The worst thing about zoneinit is that it reboots the zone when it's done. So if you open a zlogin shell to a zone which has been just vmadm create'd, you're going to be logged out very fast.

This is a huge problem from the point of view of automation. This module was created to prevent failures like that by checking for existance of /tmp/.FIRST_REBOOT_NOT_COMPLETE_YET, in addition to verifying zone's state with vmadm.

Installation

npm install wait-for-zone

Usage

var waitForZone = require('wait-for-zone')
waitForZone('bd0e5bd6-aa98-411b-90a9-693cb6d79eeb', function (err) {
  // If callback is called with no error, zone is up and running.
  // If error occured, it's passed to the callback.
})

Keywords

smartos

FAQs

Package last updated on 23 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts