Looks like listNetworks() is called a couple times in
cloudstack-agent-upgrade:

if __name__ == '__main__':
   netlib = networkConfig()
   bridges = netlib.listNetworks()
   bridges = filter(isOldStyleBridge, bridges)
   for br in bridges:
       enslavedDev = netlib.getEnslavedDev(br, 1)
       if enslavedDev is not None:
           upgradeBridgeName(br, enslavedDev)

   bridges = netlib.listNetworks()
   bridges = filter(isOldStyleBridge, bridges)
   if len(bridges) > 0:
       print("Warning: upgrade is not finished, still some bridges have the
old style name:" + str(bridges))
   else:
       print("Upgrade succeed")


On Fri, Sep 27, 2013 at 1:43 PM, Mike Tutkowski <
mike.tutkow...@solidfire.com> wrote:

> Kind of made progress here. :) Looks like we have another problem. Is it
> possible another item is missing from the scripts?
>
> mtutkowski@ubuntu:~$ sudo apt-get install cloudstack-agent
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> The following NEW packages will be installed:
>   cloudstack-agent
> 0 upgraded, 1 newly installed, 0 to remove and 468 not upgraded.
> Need to get 39.1 MB of archives.
> After this operation, 43.6 MB of additional disk space will be used.
> WARNING: The following packages cannot be authenticated!
>   cloudstack-agent
> Install these packages without verification [y/N]? y
> Get:1 http://localhost/cloudstack/repo/ binary/ cloudstack-agent 4.3.0
> [39.1 MB]
> Fetched 39.1 MB in 0s (50.5 MB/s)
> Selecting previously unselected package cloudstack-agent.
> (Reading database ... 168800 files and directories currently installed.)
> Unpacking cloudstack-agent (from .../cloudstack-agent_4.3.0_all.deb) ...
> Processing triggers for ureadahead ...
> Setting up cloudstack-agent (4.3.0) ...
> Traceback (most recent call last):
>   File "/usr/bin/cloudstack-agent-upgrade", line 51, in <module>
>     bridges = netlib.listNetworks()
> AttributeError: networkConfig instance has no attribute 'listNetworks'
> dpkg: error processing cloudstack-agent (--configure):
>  subprocess installed post-installation script returned error exit status 1
> Errors were encountered while processing:
>  cloudstack-agent
> E: Sub-process /usr/bin/dpkg returned an error code (1)
>
>
> On Fri, Sep 27, 2013 at 8:26 AM, Mike Tutkowski <
> mike.tutkow...@solidfire.com> wrote:
>
>> Great - thanks, Wei!
>>
>>
>> On Fri, Sep 27, 2013 at 2:34 AM, Wei ZHOU <ustcweiz...@gmail.com> wrote:
>>
>>> Mike,
>>> cloudstack-agent-upgrade is missing in cloudstack-agent installation.
>>> I added it in commit a6bfd9602129d8ae308ba58f36623c04826e15ca
>>>
>>> [root@weizhou-centos master(4.2)]# git show
>>> a6bfd9602129d8ae308ba58f36623c04826e15ca
>>> commit a6bfd9602129d8ae308ba58f36623c04826e15ca
>>> Author: Wei Zhou <w.z...@leaseweb.com>
>>> Date:   Fri Sep 27 10:31:54 2013 +0200
>>>     add missing cloudstack-agent-upgrade in cloudstack-agent debian
>>> packages
>>> diff --git a/debian/cloudstack-agent.install
>>> b/debian/cloudstack-agent.install
>>> index a3cc869..d708514 100644
>>> --- a/debian/cloudstack-agent.install
>>> +++ b/debian/cloudstack-agent.install
>>> @@ -21,6 +21,7 @@
>>>  /etc/init.d/cloudstack-agent
>>>  /usr/bin/cloudstack-setup-agent
>>>  /usr/bin/cloudstack-ssh
>>> +/usr/bin/cloudstack-agent-upgrade
>>>  /var/log/cloudstack/agent
>>>  /usr/share/cloudstack-agent/lib/*
>>>  /usr/share/cloudstack-agent/plugins
>>>
>>>
>>> 2013/9/27 Mike Tutkowski <mike.tutkow...@solidfire.com>
>>>
>>> > Thanks for investigating this!
>>> >
>>> > Talk to you soon!
>>> >
>>> >
>>> > On Fri, Sep 27, 2013 at 12:54 AM, Wei ZHOU <ustcweiz...@gmail.com>
>>> wrote:
>>> >
>>> > > good night
>>> > >
>>> > >
>>> > > 2013/9/27 Mike Tutkowski <mike.tutkow...@solidfire.com>
>>> > >
>>> > > > Sounds good
>>> > > >
>>> > > > Might have to get back to you tomorrow, though. I have to get up
>>> early.
>>> > > :)
>>> > > >
>>> > > >
>>> > > > On Fri, Sep 27, 2013 at 12:43 AM, Wei ZHOU <ustcweiz...@gmail.com>
>>> > > wrote:
>>> > > >
>>> > > > > ok. Thanks for your reply!
>>> > > > > The last question, could you try to download the
>>> cloudstack-agent and
>>> > > > > cloudstack-common deb packages, and "dpkg -i" to install it?
>>> > > > >
>>> > > > > I will test it on my local machine.
>>> > > > >
>>> > > > >
>>> > > > >
>>> > > > > 2013/9/27 Mike Tutkowski <mike.tutkow...@solidfire.com>
>>> > > > >
>>> > > > > > Before re-installing the DEBs I run the following:
>>> > > > > >
>>> > > > > > #sudo apt-get remove --purge cloudstack-agent
>>> > > > > >
>>> > > > > > #sudo apt-get clean
>>> > > > > > Would that be sufficient with regards to what you were asking?
>>> > > > > >
>>> > > > > >
>>> > > > > > On Fri, Sep 27, 2013 at 12:36 AM, Wei ZHOU <
>>> ustcweiz...@gmail.com>
>>> > > > > wrote:
>>> > > > > >
>>> > > > > > > What if you apt-get remove and apt-get install again?
>>> > > > > > >
>>> > > > > > >
>>> > > > > > > 2013/9/27 Mike Tutkowski <mike.tutkow...@solidfire.com>
>>> > > > > > >
>>> > > > > > > > Yeah, I had cleaned, rebuilt the codebase, regenerated the
>>> > DEBs,
>>> > > > then
>>> > > > > > > > apt-get update and apt-get install cloudstack-agent.
>>> > > > > > > >
>>> > > > > > > > I can try it again and see what happens. I thought I tried
>>> the
>>> > > > > process
>>> > > > > > > > twice and got the same results.
>>> > > > > > > >
>>> > > > > > > > I did a search for cloudstack-agent-upgrade on my file
>>> system
>>> > and
>>> > > > > only
>>> > > > > > > > found references in the source directory.
>>> > > > > > > >
>>> > > > > > > >
>>> > > > > > > > On Fri, Sep 27, 2013 at 12:30 AM, Wei ZHOU <
>>> > > ustcweiz...@gmail.com>
>>> > > > > > > wrote:
>>> > > > > > > >
>>> > > > > > > > > It is correct.
>>> > > > > > > > > Have you re-created the cloudstack-agent deb files and
>>> > uploaded
>>> > > > to
>>> > > > > > your
>>> > > > > > > > > local apt repository?
>>> > > > > > > > >
>>> > > > > > > > >
>>> > > > > > > > > 2013/9/27 Mike Tutkowski <mike.tutkow...@solidfire.com>
>>> > > > > > > > >
>>> > > > > > > > > > Here you go:
>>> > > > > > > > > >
>>> > > > > > > > > > mtutkowski@ubuntu:~/cloudstack$ grep
>>> > > cloudstack-agent-upgrade
>>> > > > > > > > > debian/rules
>>> > > > > > > > > > install -D
>>> > agent/target/transformed/cloudstack-agent-upgrade
>>> > > > > > > > > > $(DESTDIR)/usr/bin/cloudstack-agent-upgrade
>>> > > > > > > > > >
>>> > > > > > > > > >
>>> > > > > > > > > > On Fri, Sep 27, 2013 at 12:20 AM, Wei ZHOU <
>>> > > > > ustcweiz...@gmail.com>
>>> > > > > > > > > wrote:
>>> > > > > > > > > >
>>> > > > > > > > > > > Did you build the latest source?
>>> > > > > > > > > > > Could you paste the result of the following command
>>> in
>>> > your
>>> > > > > > source
>>> > > > > > > > > > > directory?
>>> > > > > > > > > > > "grep cloudstack-agent-upgrade debian/rules"
>>> > > > > > > > > > >
>>> > > > > > > > > >
>>> > > > > > > > > >
>>> > > > > > > > > >
>>> > > > > > > > > > --
>>> > > > > > > > > > *Mike Tutkowski*
>>> > > > > > > > > > *Senior CloudStack Developer, SolidFire Inc.*
>>> > > > > > > > > > e: mike.tutkow...@solidfire.com
>>> > > > > > > > > > o: 303.746.7302
>>> > > > > > > > > > Advancing the way the world uses the
>>> > > > > > > > > > cloud<
>>> http://solidfire.com/solution/overview/?video=play>
>>> > > > > > > > > > *™*
>>> > > > > > > > > >
>>> > > > > > > > >
>>> > > > > > > >
>>> > > > > > > >
>>> > > > > > > >
>>> > > > > > > > --
>>> > > > > > > > *Mike Tutkowski*
>>> > > > > > > > *Senior CloudStack Developer, SolidFire Inc.*
>>> > > > > > > > e: mike.tutkow...@solidfire.com
>>> > > > > > > > o: 303.746.7302
>>> > > > > > > > Advancing the way the world uses the
>>> > > > > > > > cloud<http://solidfire.com/solution/overview/?video=play>
>>> > > > > > > > *™*
>>> > > > > > > >
>>> > > > > > >
>>> > > > > >
>>> > > > > >
>>> > > > > >
>>> > > > > > --
>>> > > > > > *Mike Tutkowski*
>>> > > > > > *Senior CloudStack Developer, SolidFire Inc.*
>>> > > > > > e: mike.tutkow...@solidfire.com
>>> > > > > > o: 303.746.7302
>>> > > > > > Advancing the way the world uses the
>>> > > > > > cloud<http://solidfire.com/solution/overview/?video=play>
>>> > > > > > *™*
>>> > > > > >
>>> > > > >
>>> > > >
>>> > > >
>>> > > >
>>> > > > --
>>> > > > *Mike Tutkowski*
>>> > > > *Senior CloudStack Developer, SolidFire Inc.*
>>> > > > e: mike.tutkow...@solidfire.com
>>> > > > o: 303.746.7302
>>> > > > Advancing the way the world uses the
>>> > > > cloud<http://solidfire.com/solution/overview/?video=play>
>>> > > > *™*
>>> > > >
>>> > >
>>> >
>>> >
>>> >
>>> > --
>>> > *Mike Tutkowski*
>>> > *Senior CloudStack Developer, SolidFire Inc.*
>>> > e: mike.tutkow...@solidfire.com
>>> > o: 303.746.7302
>>> > Advancing the way the world uses the
>>> > cloud<http://solidfire.com/solution/overview/?video=play>
>>> > *™*
>>> >
>>>
>>
>>
>>
>> --
>> *Mike Tutkowski*
>> *Senior CloudStack Developer, SolidFire Inc.*
>> e: mike.tutkow...@solidfire.com
>> o: 303.746.7302
>> Advancing the way the world uses the 
>> cloud<http://solidfire.com/solution/overview/?video=play>
>> *™*
>>
>
>
>
> --
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkow...@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the 
> cloud<http://solidfire.com/solution/overview/?video=play>
> *™*
>



-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkow...@solidfire.com
o: 303.746.7302
Advancing the way the world uses the
cloud<http://solidfire.com/solution/overview/?video=play>
*™*

Reply via email to