Merge lp://qastaging/~raharper/curtin/trunk.vmtest-remove-bug-timers into lp://qastaging/~curtin-dev/curtin/trunk

Proposed by Ryan Harper
Status: Merged
Merged at revision: 532
Proposed branch: lp://qastaging/~raharper/curtin/trunk.vmtest-remove-bug-timers
Merge into: lp://qastaging/~curtin-dev/curtin/trunk
Diff against target: 544 lines (+128/-134)
13 files modified
curtin/commands/curthooks.py (+19/-5)
examples/tests/network_alias.yaml (+0/-2)
examples/tests/network_static_routes.yaml (+10/-15)
tests/vmtests/__init__.py (+20/-1)
tests/vmtests/test_network.py (+15/-11)
tests/vmtests/test_network_bonding.py (+16/-17)
tests/vmtests/test_network_bridging.py (+15/-9)
tests/vmtests/test_network_enisource.py (+2/-4)
tests/vmtests/test_network_ipv6.py (+0/-11)
tests/vmtests/test_network_ipv6_enisource.py (+3/-17)
tests/vmtests/test_network_ipv6_vlan.py (+0/-6)
tests/vmtests/test_network_mtu.py (+26/-24)
tests/vmtests/test_network_vlan.py (+2/-12)
To merge this branch: bzr merge lp://qastaging/~raharper/curtin/trunk.vmtest-remove-bug-timers
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Scott Moser (community) Approve
Chad Smith Pending
Review via email: mp+331757@code.qastaging.launchpad.net

Description of the change

vmtest: fix artful networking

- Remove skip_by_date calls in vmtests that are no longer valid
- ifenslave brings in ifupdown, so filter out ifenslave package if target
  release is artful
- Adjust artful bonding test to skip checking for ifslave and instead check
  that ifenslave is *not* installed
- Drop mtu settings in network-static-routes configuration, (not needed)
- Move static routes under an interface subnet to be compatible with
  netplan format which requires routes under an interface
- Refactor ip_route_show parsing, ignoring default route and fetching
  variable settings like 'proto'.
- Skiptest bridging in artful, need a cloud-init fix for stp in netplan
- Skiptest for mtu in artful, need networkd to support mtu6 support

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ryan Harper (raharper) wrote :

For testing, generally this affects the following path:

./tools/jenkins-runner -vv --nologcapture tests/vmtests/test_network*

Note, that while we're specifically looking for all of the ArtfulTest* tests to now pass (or skip)
we need to ensure that we don't regress non-artful releases.

Revision history for this message
Chad Smith (chad.smith) wrote :

Looks pretty good, couple of nits and questions.

Revision history for this message
Ryan Harper (raharper) wrote :

Thanks for the review, I'll fix up several things you've mentioned.

533. By Ryan Harper

Fix spelling of 'additional' in curthooks log message

534. By Ryan Harper

Remove unneeded .lower(), switch to an equality check

535. By Ryan Harper

Raise a ValueError in ip_route_show regex failure to match

536. By Ryan Harper

Just check for empty dpkg-query status in Artful Bonding tests

Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Scott Moser (smoser) :
Revision history for this message
Ryan Harper (raharper) wrote :

On Thu, Oct 5, 2017 at 11:21 AM, Scott Moser <email address hidden> wrote:

>
>
> Diff comments:
>
> > === modified file 'curtin/commands/curthooks.py'
> > --- curtin/commands/curthooks.py 2017-08-04 19:53:29 +0000
> > +++ curtin/commands/curthooks.py 2017-10-04 20:53:13 +0000
> > @@ -687,6 +689,19 @@
> > if pkg not in needed_packages:
> > needed_packages.append(pkg)
> >
> > + # do not install ifenslave if target release is artful as it
> > + # triggers an install of ifupdown which will break network rendering
> > + if 'ifenslave' in needed_packages:
> > + codename, _ = util.subp(['lsb_release', '--codename',
> '--short'],
>
> util.lsb_release(target=target)
>

I didn't want the dict =); will fix.

>
> > + capture=True, target=target)
> > + # drop the newline
> > + codename = codename.strip()
> > + LOG.debug('Target release codename: %s', codename)
> > + if codename == 'artful':
> > + LOG.debug("Skipping install of package 'ifenslave' to
> prevent"
> > + " network configutation errors on release %s",
> codename)
> > + needed_packages.remove('ifenslave')
>
> what about bridge-utils and vlan ?
>

bridge-utils recommends ifupdown but does not install
vlan does not bring in ifupdown either.

>
> it looks like we will install those in some scenarios too.
> maybe they dont break stuff, but ... fix ?
>
> > +
> > if needed_packages:
> > state = util.load_command_environment()
> > with events.ReportEventStack(
>
>
> --
> https://code.launchpad.net/~raharper/curtin/trunk.vmtest-
> remove-bug-timers/+merge/331757
> You are the owner of lp:~raharper/curtin/trunk.vmtest-remove-bug-timers.
>

537. By Ryan Harper

Use util.lsb_release()

Revision history for this message
Scott Moser (smoser) wrote :

but vlan and bridge-utils are not needed or desired in artful, right?

Revision history for this message
Scott Moser (smoser) wrote :

that means best case we install some stuff that odesnt get used and slow down the install.

Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ryan Harper (raharper) wrote :

vlan appears to be installed already,
bridge-utils while not needed directly to create bridges, is highly useful
for modifying/displaying bridge config. I don't think it's bad to install
it.

On Thu, Oct 5, 2017 at 11:44 AM, Scott Moser <email address hidden> wrote:

> but vlan and bridge-utils are not needed or desired in artful, right?
>
> --
> https://code.launchpad.net/~raharper/curtin/trunk.vmtest-
> remove-bug-timers/+merge/331757
> You are the owner of lp:~raharper/curtin/trunk.vmtest-remove-bug-timers.
>

Revision history for this message
Scott Moser (smoser) :
Revision history for this message
Ryan Harper (raharper) wrote :
Download full text (3.6 KiB)

On Thu, Oct 5, 2017 at 1:38 PM, Scott Moser <email address hidden> wrote:

>
>
> Diff comments:
>
> >
> > === modified file 'examples/tests/network_alias.yaml'
> > --- examples/tests/network_alias.yaml 2017-06-13 22:10:10 +0000
> > +++ examples/tests/network_alias.yaml 2017-10-05 16:35:19 +0000
> > @@ -9,11 +9,9 @@
> > subnets:
> > - type: static
> > address: 10.47.98.1/24
> > - mtu: 1501
> > - type: static
> > address: 2001:4800:78ff:1b:be76:4eff:fe06:ffac
> > netmask: 'ffff:ffff:ffff:ffff::'
> > - mtu: 1480
>
> you say "not needed" in your commit message, but why?
> and isnt it concerning that this diddnt have fallout in tests ?
>

It does have fallout for netplan which doesn;'t support ipv6 mtu;
however, the *scope* of this test is multiple ip address per interface
The mtu itself has no affect on assigning multiple addresses to a single
interface.

The failure to apply an ipv6 MTU in this test is not germane; we're
only testing if we can set multiple ips.

>
> > # multi_v4_alias: multiple v4 addrs on same interface
> > - type: physical
> > name: interface1
> >
> > === modified file 'tests/vmtests/test_network.py'
> > --- tests/vmtests/test_network.py 2017-08-02 15:46:35 +0000
> > +++ tests/vmtests/test_network.py 2017-10-05 16:35:19 +0000
> > @@ -285,14 +285,19 @@
> > ip_route_show = self.load_collect_file("ip_route_show")
> > logger.debug("ip route show:\n{}".format(ip_route_show))
> > for line in [line for line in ip_route_show.split('\n')
> > - if 'src' in line]:
> > + if 'src' in line and not
> line.startswith('default')]:
> > + print('ip_route_show: line: %s' % line)
> > m = re.search(r'^(?P<network>\S+)\sdev\s' +
> > r'(?P<devname>\S+)\s+' +
> > - r'proto kernel\s+scope link' +
> > - r'\s+src\s(?P<src_ip>\S+)',
> > + r'proto\s(?P<proto>\S+)\s+' +
> > + r'scope\s(?P<scope>\S+)\s+' +
> > + r'src\s(?P<src_ip>\S+)',
> > line)
> > - route_info = m.groupdict('')
> > - logger.debug(route_info)
> > + if m:
> > + route_info = m.groupdict('')
> > + logger.debug(route_info)
> > + else:
> > + raise ValueError('Failed match ip_route_show line: %s'
> % line)
>
> bikeshed: this is probably more of a RuntimeException
> kind of "got stuff i didnt expect".
> doesnt matter. take input or not.
>

Sure

>
> >
> > routes = {
> > '4': route_n,
> > @@ -390,7 +395,8 @@
> > gateways.append(subnet.get('gateway'))
> > for route in subnet.get('routes', []):
> > gateways += __find_gw_config(route)
> > - return gateways
> > + # drop duplicate gateways (static routes)
>
> this does have the side affect of sorting your list.
>

That's ok, we iterate ...

Read more...

538. By Ryan Harper

Merge from smoser

539. By Ryan Harper

Fix up merge issues

Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Scott Moser (smoser) wrote :

i'm good with this. lets see it pass the test run above and then pull.

review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ryan Harper (raharper) wrote :

Computer says yes!

Ran 2167 tests in 9300.984s

OK (SKIP=161)
Thu, 05 Oct 2017 23:51:46 +0000: vmtest end [0] in 9302s
+ RET=0

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches