New Question
0

'ExtendVolumesPlugin' failed with error '(-2147212277, None, (None, None, None, 0, None))'

asked 2020-03-10 10:04:04 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello, I use cloudbase-init to extend my volume.

First in Openstack I added a disk, then I rebooted the Windows Server 2016 or Windows Server 2008 R2. ExtendVolumesPlugin did not work and it told me 'ExtendVolumesPlugin' failed with error '(-2147212277, None, (None, None, None, 0, None))'

When I restarted service cloudbase-init, ExtendVolumesPlugin worked and the volume D was extended to 50G successfully.

In my conf there is a plugin called DiskOnlinePlugin which can make all offline disks online. I use ExtendVolumesPlugin to extend volume. However the volume D(disk 1) is just 0.99G in Windows while the disk size is 50G. In disk management of Windows, the disk 1 has 49G which is not formatted. I wish the volume D can be extended to 50G.

I wonder why the first time ExtendVolumesPlugin didn't work. My cloudbase-init is 0.9.11 stable version.

The following are my conf and log.

=====================

[DEFAULT]

username=Administrator

groups=Administrators

injectuserpassword=false

configdriveraw_hhd=true

configdrivecdrom=true

configdrivevfat=true

bsdtar_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\bsdtar.exe

mtools_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\

verbose=true

debug=true

logdir=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log\

logfile=cloudbase-init.log

defaultloglevels=comtypes=INFO,suds=INFO,iso8601=WARN,requests=WARN

loggingserialport_settings=COM1,115200,N,8

mtuusedhcp_config=true

ntpusedhcp_config=true

localscriptspath=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\LocalScripts\

plugins=cloudbaseinit.plugins.windows.diskonline.DiskOnlinePlugin,

cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin,

cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin

allow_reboot=false

=========================================

2020-03-10 12:04:08.821 2956 INFO cloudbaseinit.init [-] Executing plugin 'ExtendVolumesPlugin'

2020-03-10 12:04:08.836 2956 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.osutils.windows.WindowsUtils' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27

2020-03-10 12:04:08.852 2956 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.utils.windows.storage.vdsstoragemanager.VDSStorageManager' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27

2020-03-10 12:04:12.165 2956 INFO comtypes.client.codecache [-] Imported existing <module 'comtypes.gen'="" from="" 'c:\\program="" files\\cloudbase="" solutions\\cloudbase-init\\python\\lib\\site-packages\\comtypes\\gen\\__init__.py'="">

2020-03-10 12:04:12.165 2956 INFO comtypes.client.codecache [-] Using writeable comtypes cache directory: 'c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\comtypes\gen'

2020-03-10 12:04:45.743 2956 ERROR cloudbaseinit.init [-] plugin 'ExtendVolumesPlugin' failed with error '(-2147212277, None, (None, None, None, 0, None))'

2020-03-10 12:04:45.758 2956 ERROR cloudbaseinit.init [-] (-2147212277, None, (None, None, None, 0, None))

2020-03-10 12:04:45.758 2956 ERROR cloudbaseinit.init Traceback (most recent call last):

2020-03-10 12:04:45.758 2956 ERROR cloudbaseinit.init File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\init.py", line 65, in execplugin

2020-03-10 12:04:45.758 2956 ERROR cloudbaseinit.init shared_data)

2020-03-10 12:04:45.758 2956 ERROR cloudbaseinit.init File "c:\program files\cloudbase solutions\cloudbase-init\python\lib ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2020-03-10 10:43:39 +0200

avladu gravatar image

Hello,

The error you are getting might be a concurrency issue between the custom plugin and the extendvolume one. Can you please open a bug on github to better track this problem https://github.com/cloudbase/cloudbas... ?

The correct run when starting the service a second time indicates that the initialization of the disk took a while and the extend plugin did not have a valid disk to extend at the moment of the run, but I cannot be sure without knowing what the diskonline plugin does. Is DiskOnlinePlugin similar to plugin San Policy Config, which exists in the latest stable version 1.1.0 https://cloudbase-init.readthedocs.io... ?

Thank you,
Adrian Vladu

edit flag offensive delete link more

Comments

thank you, I fix my DiskOnlinePlugin to make sure that all disks are online. Then the plugin will finish. I found another problem that when all disks are online, the extendvolumeplugin start excute.

ubuntu7us gravatar imageubuntu7us ( 2020-03-11 13:15:14 +0200 )edit

However only a volume was extented. When I restarted the service to re-excute extendvolumeplugin, the remaining volumes were extended.

ubuntu7us gravatar imageubuntu7us ( 2020-03-11 13:16:12 +0200 )edit

I add new logs to the question content.

ubuntu7us gravatar imageubuntu7us ( 2020-03-11 13:16:49 +0200 )edit

It might be a session issue, or a refresh of some kind is needed (maybe simmilar to a Get-PSDrive in PS). But I cannot know for sure without the diskonline code. Can you share the disk online plugin code so that I can reproduce this behaviour? It would be nice to have the plugin added to cbs-init.

avladu gravatar imageavladu ( 2020-03-11 20:16:37 +0200 )edit

I tried to reproduce the behaviour, but I could not find any issues with the ExtendVolume plugin. The purpose of the ExtendVolume plugin is to extend the partition (aka volume). I am waiting for your disk online plugin code for further debugging (which supposedly does onlining/partition/formatting).

avladu gravatar imageavladu ( 2020-03-19 13:53:31 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-03-10 10:04:04 +0200

Seen: 2,221 times

Last updated: Mar 11 '20