Bug #4669

ovswitch vlan tag missing

Added by Emil Öhgren almost 5 years ago. Updated almost 5 years ago.

Status:ClosedStart date:07/21/2016
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Drivers - Network
Target version:-
Resolution:worksforme Pull request:
Affected Versions:OpenNebula 5.0

Description

After upgrading to opennebula 5.0, opennebula no longer adds the vlan tag on ovswitch interfaces on new virtual machines.

  1. onevnet show 0
    VIRTUAL NETWORK 0 INFORMATION
    ID : 0
    NAME : VLAN20
    USER : oneadmin
    GROUP : DEVOPS
    CLUSTERS : 100
    BRIDGE : br0
    VN_MAD : ovswitch
    VLAN ID : 20
    USED LEASES : 32

PERMISSIONS
OWNER : um-
GROUP : uma
OTHER : ---

VIRTUAL NETWORK TEMPLATE
AR=[ SIZE="1022", TYPE="ETHER" ]
BRIDGE="br0"
DESCRIPTION="etc"
NAME="VLAN20"
PHYDEV=""
VLAN="YES"
VLAN_ID="20"
VN_MAD="ovswitch"

boot log:
Wed Jul 20 14:59:51 2016 [Z0][VM][I]: New state is ACTIVE
Wed Jul 20 14:59:51 2016 [Z0][VM][I]: New LCM state is PROLOG
Wed Jul 20 14:59:52 2016 [Z0][VM][I]: New LCM state is BOOT
Wed Jul 20 14:59:52 2016 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/378/deployment.0
Wed Jul 20 14:59:54 2016 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context.
Wed Jul 20 14:59:54 2016 [Z0][VMM][I]: ExitCode: 0
Wed Jul 20 14:59:54 2016 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Wed Jul 20 14:59:55 2016 [Z0][VMM][I]: ExitCode: 0
Wed Jul 20 14:59:55 2016 [Z0][VMM][I]: Successfully execute virtualization driver operation: deploy.
Wed Jul 20 14:59:56 2016 [Z0][VMM][I]: post: Executed "sudo ovs-ofctl add-flow br0 in_port=29,dl_src=02:00:ec:7e:07:26,priority=40000,actions=normal".
Wed Jul 20 14:59:56 2016 [Z0][VMM][I]: post: Executed "sudo ovs-ofctl add-flow br0 in_port=29,priority=39000,actions=drop".
Wed Jul 20 14:59:56 2016 [Z0][VMM][I]: ExitCode: 0
Wed Jul 20 14:59:56 2016 [Z0][VMM][I]: Successfully execute network driver operation: post.
Wed Jul 20 14:59:56 2016 [Z0][VM][I]: New LCM state is RUNNING

ovs-vsctl show
0b02a72e-769c-4c02-9d50-d6489fd587fe
Bridge "br0"
Port "one-378-0"
Interface "one-378-0"
Port "vnet0"
tag: 20
Interface "vnet0"
Port "bond0"
Interface "p1p1"
Interface "p1p2"
Port "br0"
Interface "br0"
type: internal
Port mgm
Interface mgm
type: internal
ovs_version: "2.0.2"
  1. onevm show 378
    VIRTUAL MACHINE 378 INFORMATION
    ID : 378
    NAME : labb04
    USER : foo
    GROUP : DEVOPS
    STATE : ACTIVE
    LCM_STATE : RUNNING
    RESCHED : No
    HOST : vm04
    CLUSTER ID : 100
    CLUSTER : cl1
    START TIME : 07/20 14:59:36
    END TIME : -
    DEPLOY ID : one-378

VIRTUAL MACHINE MONITORING
CPU : 0.0
MEMORY : 574.8M
NETTX : 2.2M
NETRX : 105M

PERMISSIONS
OWNER : um-
GROUP : um-
OTHER : ---

VM DISKS
ID DATASTORE TARGET IMAGE SIZE TYPE SAVE
0 cephds vda trusty-server-cloudimg /2.2G rbd NO
1 - hda CONTEXT 1M/
- -

VM NICS
ID NETWORK BRIDGE IP MAC
0 VLAN20 br0 - 02:00:ec:7e:07:26

VIRTUAL MACHINE HISTORY
SEQ HOST ACTION DS START TIME PROLOG
0 vm04 none 0 07/20 14:59:51 0d 00h37m 0h00m01s

USER TEMPLATE
HOSTNAME="labb04"
HYPERVISOR="kvm"
LOGO="images/logos/ubuntu.png"
SCHED_RANK="-RUNNING_VMS"
SCHED_REQUIREMENTS="ENOUGH_RESOURCES = 1"
USER_INPUTS=[
HOSTNAME="M|text|hostname" ]

VIRTUAL MACHINE TEMPLATE
AUTOMATIC_DS_REQUIREMENTS="\"CLUSTERS/ID\" = 100"
AUTOMATIC_REQUIREMENTS="(CLUSTER_ID = 100) & !(PUBLIC_CLOUD = YES)"
CONTEXT=[
DISK_ID="1",
HOSTNAME="host1",
SSH_PUBLIC_KEY="ssh-rsa ",
TARGET="hda",
USER_DATA="#cloud-config
bootcmd:
- ifdown a
hostname: 'labb04'
fqdn: 'host1'
manage_etc_hosts: true
apt_update: true
apt_upgrade: true
apt_reboot_if_required: true
timezone: Europe/Stockholm
packages:
- nano
apt_sources:
- source: 'deb http://apt/chef trusty main'
key: |
-----BEGIN PGP PUBLIC KEY BLOCK----

Version: GnuPG v1.4.12 (Darwin)
Comment: GPGTools - http://gpgtools.org
-----END PGP PUBLIC KEY BLOCK-----

chef:
force_install: false
server_url: 'https://chef/organizations/org1'
node_name: 'host1'
validation_name: deltaprojects-validator
validation_cert: |
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
run_list:
- 'role[foo]'
- 'role[bar]'
runcmd:
- /opt/chef/embedded/bin/gem install chef_handler_foreman
- chef-client
output: {all: '| tee -a /var/log/cloud-init-output.log'}
" ]
CPU="1"
GRAPHICS=[
LISTEN="0.0.0.0",
PORT="6278",
TYPE="VNC" ]
MEMORY="512"
NIC_DEFAULT=[
MODEL="virtio" ]
OS=[
BOOT="network,hd" ]
RAW=[
DATA="<cpu mode='custom' match='exact'>
<model fallback='forbid'>SandyBridge</model>
<vendor>Intel</vendor>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='osxsave'/>
<feature policy='require' name='dca'/>
<feature policy='require' name='pcid'/>
<feature policy='require' name='pdcm'/>
<feature policy='require' name='xtpr'/>
<feature policy='require' name='tm2'/>
<feature policy='require' name='est'/>
<feature policy='require' name='smx'/>
<feature policy='require' name='vmx'/>
<feature policy='require' name='ds_cpl'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='dtes64'/>
<feature policy='require' name='pbe'/>
<feature policy='require' name='tm'/>
<feature policy='require' name='ht'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='acpi'/>
<feature policy='require' name='ds'/>
<feature policy='require' name='vme'/>
</cpu>",
TYPE="kvm" ]
SUBMIT_ON_HOLD="YES"
TEMPLATE_ID="24"
VMID="378"

History

#1 Updated by Emil Öhgren almost 5 years ago

I had missunderstood the "onehost sync" command, since I use a shared filesystem for /var/lib/one I was under the impression that I didnt need to sync the files..
But after a onehost sync it solved my problem.

oneadmin@vm01:~$ onehost sync
  • Adding vm01 to upgrade
  • Adding vm03 to upgrade
  • Adding vm02 to upgrade
  • Adding vm04 to upgrade
    [========================================] 4/4 vm04
    All hosts updated successfully.

#2 Updated by EOLE Team almost 5 years ago

Emil Öhgren wrote:

I had missunderstood the "onehost sync" command, since I use a shared filesystem for /var/lib/one I was under the impression that I didnt need to sync the files..
But after a onehost sync it solved my problem.

The onehost sync copies the directory /var/lib/one/remotes from the frontend to /var/tmp/one/ on the hypervisors, so a shared /var/lib/one/ is not sufficient.

Regards.

#3 Updated by Ruben S. Montero almost 5 years ago

  • Status changed from Pending to Closed
  • Resolution set to worksforme

Also available in: Atom PDF