Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

openstack npm pkgcloud createImage() function not working

I am trying to create an image of an instance in openstack using npm pkgcloud. For this I am using the code as below:

var openstack_client_compute = null; openstack_client_compute = pkgcloud.compute.createClient({ provider: PROVIDER, // required username: USERNAME, // required password: PASSWORD, // required region: REGION, authUrl: AUTH_URL // required }); options = { name: 'image1', // required server: '0e4d56a2-173a-425d-befd-cec366605522' // required }; openstack_client_compute.createImage(options, function(err, image){ if(err){ console.log(err); } console.log(image); }); I am getting the following error :

name: 'Error', provider: 'openstack', failCode: 'Service Unavailable', statusCode: 503, href: 'http://controller:8774/v2.1/6af81940df2c49489f088beba7d93/servers/0e4d56a2-173a-425d-befd-cec366605522/action',

method: 'POST', headers: { server: 'squid', 'mime-version': '1.0', date: 'Mon, 09 Apr 2018 07:21:15 GMT', 'content-type': 'text/html;charset=utf-8', 'content-length': '3012', 'x-squid-error': 'ERR_DNS_FAIL 0', 'x-cache': 'MISS from lproxy', 'x-cache-lookup': 'MISS from proxy:8080', connection: 'close' },

Note : other functions such as createStack deleteStack getStack etc are functioning properly

openstack npm pkgcloud createImage() function not working

I am trying to create an image of an instance in openstack using npm pkgcloud. For this I am using the code as below:

var openstack_client_compute = null; openstack_client_compute = pkgcloud.compute.createClient({ provider: PROVIDER, // required username: USERNAME, // required password: PASSWORD, // required region: REGION, authUrl: AUTH_URL // required }); options = { name: 'image1', // required server: '0e4d56a2-173a-425d-befd-cec366605522' // required }; openstack_client_compute.createImage(options, function(err, image){ if(err){ console.log(err); } console.log(image); }); I am getting the following error :

name: 'Error', provider: 'openstack', failCode: 'Service Unavailable', statusCode: 503, href: 'http://controller:8774/v2.1/6af81940df2c49489f088beba7d93/servers/0e4d56a2-173a-425d-befd-cec366605522/action',

method: 'POST', headers: { server: 'squid', 'mime-version': '1.0', date: 'Mon, 09 Apr 2018 07:21:15 GMT', 'content-type': 'text/html;charset=utf-8', 'content-length': '3012', 'x-squid-error': 'ERR_DNS_FAIL 0', 'x-cache': 'MISS from lproxy', 'x-cache-lookup': 'MISS from proxy:8080', connection: 'close' },

Note : other functions such as createStack deleteStack getStack etc are functioning properly

openstack npm pkgcloud createImage() function not working

I am trying to create an image of an instance in openstack using npm pkgcloud. For this I am using the code as below:

var openstack_client_compute = null;
openstack_client_compute = pkgcloud.compute.createClient({
provider: PROVIDER, // required
username: USERNAME, // required
password: PASSWORD, // required 
region: REGION,
authUrl: AUTH_URL // required
});
options = {
name: 'image1',  // required
server: '0e4d56a2-173a-425d-befd-cec366605522'  // required
};
openstack_client_compute.createImage(options, function(err, image){
if(err){
console.log(err);
}
console.log(image);
});

I am getting the following error :

name: 'Error', provider: 'openstack', failCode: 'Service Unavailable', statusCode: 503, href: 'http://controller:8774/v2.1/6af81940df2c49489f088beba7d93/servers/0e4d56a2-173a-425d-befd-cec366605522/action',

method: 'POST', headers: { server: 'squid', 'mime-version': '1.0', date: 'Mon, 09 Apr 2018 07:21:15 GMT', 'content-type': 'text/html;charset=utf-8', 'content-length': '3012', 'x-squid-error': 'ERR_DNS_FAIL 0', 'x-cache': 'MISS from lproxy', 'x-cache-lookup': 'MISS from proxy:8080', connection: 'close' },

Note : other functions such as createStack deleteStack getStack etc are functioning properlyproperly.

Is there any issue with the code or the package pkgcloud that I am using?