openstack npm pkgcloud createImage() function not working

asked 2018-04-10 07:18:57 -0500

msd_openstack gravatar image

updated 2018-04-17 01:48:25 -0500

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.

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

edit retag flag offensive close merge delete