nova-hyperv: Import-Module : nova-hyperv - 'CharmHelpers' was not loaded because no module was found in any module directory

Bug #1442198 reported by Larry Michel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juju Charms Collection
Fix Committed
Undecided
Gabriel Samfira

Bug Description

This is with v1 of the charm and the Juju version 1.22. The charm never goes to error state but deployer shows installing. Looking at the all machine log, the only error that's shown is failure to load CharmHelpers.

From console:

2015-03-31 05:38:41,749 [DEBUG] deployer.env: Delta unit: nova-hyperv/0 change:allocating
2015-03-31 05:39:31,753 [DEBUG] deployer.env: Delta unit: nova-hyperv/0 change:installing
2015-03-31 05:39:31,835 [DEBUG] deployer.env: Delta unit: nova-hyperv/0 change:installing
2015-03-31 05:39:46,755 [DEBUG] deployer.env: Delta unit: nova-hyperv/0 change:installing
2015-03-31 06:36:03,920 [DEBUG] deployer.env: Connecting to environment...
2015-03-31 06:36:05,198 [DEBUG] deployer.env: Connected to environment
2015-03-31 06:36:05,199 [ERROR] deployer.import: Reached deployment timeout.. exiting
2015-03-31 06:36:05,200 [ERROR] oil_ci.deploy.oil_deployer: Deployment failed:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/oil_ci/deploy/oil_deployer.py", line 140, in deploy
    debug=True, verbose=True)
  File "/usr/lib/python2.7/dist-packages/oil_ci/juju/juju_deployer.py", line 85, in run_deployer
    importer.Importer(env, deploy, options=opts).run()
  File "/usr/lib/python2.7/dist-packages/deployer/action/importer.py", line 214, in run
    self.check_timeout()
  File "/usr/lib/python2.7/dist-packages/deployer/action/importer.py", line 165, in check_timeout
    raise ErrorExit()
ErrorExit
2015-03-31 06:36:05,239 [INFO] oil_ci.deploy.oil_deployer: Saving deployment artifacts to: ./artifacts
+ rc=1
+ echo 'Deployment returned: 1'
Deployment returned: 1
+ [[ 1 == 0 ]]

From all machines log:

machine-0: 2015-03-31 05:39:42 DEBUG juju.apiserver apiserver.go:265 <- [81] unit-nova-hyperv-0 {"RequestId":81,"Type":"Uniter","Version":1,"Request":"PublicAddress","Params":{"Entities":[{"Tag":"unit-nova-hyperv-0"}]}}
machine-0: 2015-03-31 05:39:42 DEBUG juju.apiserver apiserver.go:272 -> [81] unit-nova-hyperv-0 1.644356ms {"RequestId":81,"Response":{"Results":[{"Error":null,"Result":"marmon.oil"}]}} Uniter[""].PublicAddress
machine-0: 2015-03-31 05:39:42 DEBUG juju.apiserver apiserver.go:265 <- [81] unit-nova-hyperv-0 {"RequestId":82,"Type":"Uniter","Version":1,"Request":"PrivateAddress","Params":{"Entities":[{"Tag":"unit-nova-hyperv-0"}]}}
machine-0: 2015-03-31 05:39:42 DEBUG juju.apiserver apiserver.go:272 -> [81] unit-nova-hyperv-0 1.723404ms {"RequestId":82,"Response":{"Results":[{"Error":null,"Result":"10.245.0.169"}]}} Uniter[""].PrivateAddress
machine-0: 2015-03-31 05:39:46 DEBUG juju.apiserver apiserver.go:272 -> [1B] user-admin@local 14.837853163s {"RequestId":101,"Response":{"Deltas":[["unit","change",{"Name":"nova-hyperv/0","Service":"nova-hyperv","Series":"win2012hvr2","CharmURL":"local:win2012hvr2/nova-hyperv-0","PublicAddress":"marmon.oil","PrivateAddress":"10.245.0.169","MachineId":"4","Ports":[],"PortRanges":[],"Status":"installing","StatusInfo":"","StatusData":{},"Subordinate":false}]]}} AllWatcher["1"].Next
unit-nova-hyperv-0[2404]: 2015-03-31 05:39:52 INFO unit.nova-hyperv/0.config-changed logger.go:40 Import-Module : The specified module 'CharmHelpers' was not loaded because no
unit-nova-hyperv-0[2404]: 2015-03-31 05:39:52 INFO unit.nova-hyperv/0.config-changed logger.go:40 valid module file was found in any module directory.
unit-nova-hyperv-0[2404]: 2015-03-31 05:39:52 INFO unit.nova-hyperv/0.config-changed logger.go:40 At C:\Juju\lib\juju\agents\unit-nova-hyperv-0\charm\hooks\config-changed.ps1:8
unit-nova-hyperv-0[2404]: 2015-03-31 05:39:52 INFO unit.nova-hyperv/0.config-changed logger.go:40 char:1
unit-nova-hyperv-0[2404]: 2015-03-31 05:39:52 INFO unit.nova-hyperv/0.config-changed logger.go:40 + Import-Module -DisableNameChecking CharmHelpers
unit-nova-hyperv-0[2404]: 2015-03-31 05:39:52 INFO unit.nova-hyperv/0.config-changed logger.go:40 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
unit-nova-hyperv-0[2404]: 2015-03-31 05:39:52 INFO unit.nova-hyperv/0.config-changed logger.go:40 + CategoryInfo : ResourceUnavailable: (CharmHelpers:String) [Impo
unit-nova-hyperv-0[2404]: 2015-03-31 05:39:52 INFO unit.nova-hyperv/0.config-changed logger.go:40 rt-Module], FileNotFoundException
unit-nova-hyperv-0[2404]: 2015-03-31 05:39:52 INFO unit.nova-hyperv/0.config-changed logger.go:40 + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Comm
unit-nova-hyperv-0[2404]: 2015-03-31 05:39:52 INFO unit.nova-hyperv/0.config-changed logger.go:40 ands.ImportModuleCommand
unit-nova-hyperv-0[2404]: 2015-03-31 05:39:52 INFO unit.nova-hyperv/0.config-changed logger.go:40
unit-nova-hyperv-0[2404]: 2015-03-31 05:39:55 INFO worker.uniter.jujuc server.go:110 running hook tool "config-get.exe" ["--format=json" "vmswitch-name"]
unit-nova-hyperv-0[2404]: 2015-03-31 05:39:55 DEBUG worker.uniter.jujuc server.go:111 hook context id "nova-hyperv/0-config-changed-5307577487671049208"; dir "C:\\Juju\\lib\\juju\\agents\\unit-nova-hyperv-0\\charm"
machine-0: 2015-03-31 05:39:55 DEBUG juju.apiserver apiserver.go:265 <- [81] unit-nova-hyperv-0 {"RequestId":83,"Type":"Uniter","Version":1,"Request":"ConfigSettings","Params":{"Entities":[{"Tag":"unit-nova-hyperv-0"}]}}

Not sure if this can be recreated with V2. I will update this bug if it's recreated.

I have attached the all machines debug log

Tags: oil
Revision history for this message
Larry Michel (lmic) wrote :
Revision history for this message
Larry Michel (lmic) wrote :
Download full text (4.9 KiB)

With V2, this is actually re-creatable.

unit-nova-hyperv-0[2268]: 2015-04-01 14:49:49 DEBUG juju.worker.uniter.filter filter.go:373 got unit change
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:54 INFO unit.nova-hyperv/0.install logger.go:40 Import-Module : The specified module 'CharmHelpers' was not loaded because no
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:54 INFO unit.nova-hyperv/0.install logger.go:40 valid module file was found in any module directory.
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:54 INFO unit.nova-hyperv/0.install logger.go:40 At C:\Juju\lib\juju\agents\unit-nova-hyperv-0\charm\hooks\install.ps1:7 char:1
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:54 INFO unit.nova-hyperv/0.install logger.go:40 + Import-Module -DisableNameChecking CharmHelpers
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:54 INFO unit.nova-hyperv/0.install logger.go:40 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:54 INFO unit.nova-hyperv/0.install logger.go:40 + CategoryInfo : ResourceUnavailable: (CharmHelpers:String) [Impo
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:54 INFO unit.nova-hyperv/0.install logger.go:40 rt-Module], FileNotFoundException
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:54 INFO unit.nova-hyperv/0.install logger.go:40 + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Comm
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:54 INFO unit.nova-hyperv/0.install logger.go:40 ands.ImportModuleCommand
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:54 INFO unit.nova-hyperv/0.install logger.go:40
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:55 INFO juju.worker.uniter.context context.go:359 handling reboot
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:55 INFO juju.worker.uniter.operation runhook.go:92 ran "install" hook
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:55 INFO juju.worker.uniter.operation executor.go:87 committing operation "run install hook"
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:55 DEBUG juju.worker.uniter modes.go:417 ModeContinue exiting
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:55 INFO juju.worker.uniter modes.go:415 ModeContinue starting
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:55 INFO juju.worker.uniter modes.go:50 continuing after "install" hook
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:55 DEBUG juju.worker.uniter modes.go:417 ModeContinue exiting
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:55 INFO juju.worker.uniter modes.go:415 ModeConfigChanged starting
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:55 INFO juju.worker.uniter.operation executor.go:66 running operation run config-changed hook
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:55 INFO juju.worker.uniter.operation executor.go:87 preparing operation "run config-changed hook"
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:55 DEBUG juju.worker.uniter.filter filter.go:523 discarded config event
unit-nova-hyperv-0[2268]: 2015-04-01 14:49:55 INFO juju.worker.uniter.operation executor.go:87 executing operation "run config-changed hook"
unit-nova-hyperv-0[2268]: 2015-04-01 14:50:03 INFO worker.uniter.jujuc server.go:110 running hook tool "juju-log.exe" ["Failed to import modules: The specified module 'CharmHelp...

Read more...

Revision history for this message
Larry Michel (lmic) wrote :

The juju version is 1.22. Note that this issue seems to be intermittent with the version 1 of the charm. I haven't verified that this issue coincide with upgrade to Juju 1.22 but that's the only thing I can see that's changed as we had not previously observed this.

 I haven't had enough runs with it with the version 2 of the charm to determine whether it's also intermittent with that version but anticipating that it is. I'll do some more runs to see whether we eventually get a successful or one that goes past this error.

summary: - nova-hyperv v1: Prodstack: Import-Module : nova-hyperv - 'CharmHelpers'
- was not loaded because no module was found in any module directory
+ nova-hyperv: Prodstack: Import-Module : nova-hyperv - 'CharmHelpers' was
+ not loaded because no module was found in any module directory
description: updated
Revision history for this message
Larry Michel (lmic) wrote : Re: nova-hyperv: Prodstack: Import-Module : nova-hyperv - 'CharmHelpers' was not loaded because no module was found in any module directory

All machines log for the run with nova-hyperv v2.

Larry Michel (lmic)
summary: - nova-hyperv: Prodstack: Import-Module : nova-hyperv - 'CharmHelpers' was
- not loaded because no module was found in any module directory
+ nova-hyperv: Import-Module : nova-hyperv - 'CharmHelpers' was not loaded
+ because no module was found in any module directory
Revision history for this message
Gabriel Samfira (gabriel-samfira) wrote :

Starting with version 1.22, the default path for powershell modules is in $CHARM_DIR/lib/Modules. I updated the charm to take this into account. Please give: http://bazaar.launchpad.net/~cloudbaseit/charms/win2012hvr2/nova-hyperv/trunk another shot.

Changed in charms:
assignee: nobody → Gabriel Samfira (gabriel-samfira)
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.