I find problems to change the IP address on Ubuntu 18.04

Bug #1799695 reported by Claudio Ruta on 2018-10-24

This bug report will be marked for expiration in 19 days if no further activity occurs. (find out why)

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
netplan
Undecided
Unassigned

Bug Description

Hello,

I have installed an Ubuntu 18.04 as z/VM guest.
After the installation I need to change the IP address.
I changed it on /etc/netplan/01-netcfg.yaml and then I tried to apply the change using the command "sudo netplan apply" but unsuccessfully.
I performed the "sudo netplan --debug apply" and I see these messages:

root@UBUNTIPL:/etc/netplan# sudo netplan --debug apply
** (generate:1592): DEBUG: 08:26:14.693: Processing input file //etc/netplan/01-netcfg.yaml..
** (generate:1592): DEBUG: 08:26:14.693: starting new processing pass
** (generate:1592): DEBUG: 08:26:14.693: Processing input file //etc/netplan/01-network-manager-all.yaml..
** (generate:1592): DEBUG: 08:26:14.693: starting new processing pass
** (generate:1592): DEBUG: 08:26:14.693: enc2e02: setting default backend to 2
** (generate:1592): DEBUG: 08:26:14.693: Generating output files..
** (generate:1592): DEBUG: 08:26:14.693: networkd: definition enc2e02 is not for us (backend 2)
DEBUG:no netplan generated networkd configuration exists
DEBUG:netplan generated NM configuration exists, restarting NM
DEBUG:device lo operstate is unknown, not replugging
DEBUG:netplan triggering .link rules for lo
DEBUG:device enc2e02 operstate is up, not replugging
DEBUG:netplan triggering .link rules for enc2e02

For more details I performed also "sudo netplan --debug generate":

root@UBUNTIPL:/etc/netplan# sudo netplan --debug generate
DEBUG:command generate: running ['/lib/netplan/generate']
** (generate:1835): DEBUG: 08:38:35.969: Processing input file //etc/netplan/01-netcfg.yaml..
** (generate:1835): DEBUG: 08:38:35.970: starting new processing pass
** (generate:1835): DEBUG: 08:38:35.970: Processing input file //etc/netplan/01-network-manager-all.yaml..
** (generate:1835): DEBUG: 08:38:35.970: starting new processing pass
** (generate:1835): DEBUG: 08:38:35.970: enc2e02: setting default backend to 2
** (generate:1835): DEBUG: 08:38:35.970: Generating output files..
** (generate:1835): DEBUG: 08:38:35.970: networkd: definition enc2e02 is not for us (backend 2)

Thanks in advanced for the attention

Please share the contents of all the .yaml files in /etc/netplan.
Also, please describe how you did the installation for that system.

I see from the logs that there exists a /etc/netplan/01-network-manager-all.yaml, which does not sound right for an install on s390x -- either we have a bug in the installer, or NetworkManager was installed in addition to what is normally installed on s390x by the installation process.

To set an address, make sure to modify the:

addresses: [ ]

list to include the address you want (or use "dhcp4: yes" or "dhcp6: yes" if you need DHCP), and additionally change "gateway4" or "gateway6" if you're not using DHCP, to let the system know what to use as a default gateway. You may also need to update details for the nameservers.

See https://netplan.io/examples#dhcp-and-static-addressing for more details on how to set addresses with netplan.

Changed in netplan:
status: New → Incomplete
Claudio Ruta (cruta) wrote :

Hi,
Thanks for your support...
I performed the installation under z/VM. I mounted the ubuntu-18.04.1-server-s390x.iso image and received the installation files for RDR IPL. Then, I performed the IPL from RDR and followed the standard installation steps.
I choise to NO DHCP. I need to use a static IP.
After the installation and reboot the machine works and I can able to rech it using the initial IP 9.30.243.118

follow the /etc/netplan files:

root@UBUNTIPL:/etc/netplan# cat 01-network-manager-all.yaml
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enc2e02:
      addresses: [ 9.30.241.124/22 ]
      gateway4: 9.30.240.1
      nameservers:
          search: [ svl.ibm.com ]
          addresses:
              - "9.30.31.32"

In the last file I have only changed the IP address from 9.30.243.118 to 9.30.241.124.

Thanks in advanced

Claudio Ruta (cruta) wrote :

Hi,
are there any news about the issue ?

Thanks a lot in advanced

Claudio Ruta (cruta) wrote :

Please,

I have not heard from you again.
Can you help me or not?

Thanks

Claudio Ruta (cruta) wrote :

Hi,

Thanks in advanced for your support...

Following my answer about your installation details request:

I performed the installation under z/VM. I mounted the ubuntu-18.04.1-server-s390x.iso image and received the installation files for RDR IPL. Then, I performed the IPL from RDR and followed the standard installation steps.
I choice to NO DHCP. I need to use a static IP.
After the installation and reboot the machine works and I'm able to reach it using the initial IP 9.30.243.118
follow the /etc/netplan files:
root@UBUNTIPL:/etc/netplan# cat 01-network-manager-all.yaml
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

root@UBUNTIPL:/etc/netplan# cat 01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enc2e02:
      addresses: [ 9.30.241.124/22 ]
      gateway4: 9.30.240.1
      nameservers:
          search: [ svl.ibm.com ]
          addresses:
              - "9.30.31.32"
In the last file I have only changed the IP address from 9.30.243.118 to 9.30.241.124 but when I try to apply this change I touch the below reported error...

Thanks in advanced for your attention and support.

Regards

Claudio Ruta (cruta) on 2018-11-27
Changed in netplan:
status: Incomplete → In Progress
status: In Progress → Incomplete
Claudio Ruta (cruta) wrote :

is there a reason why I do not receive updates about my problem?
I failed to do some action?
Can you kindly give me an answer?
Thanks in advance

Ryan Harper (raharper) wrote :

Can you provide output from:

1) ip a
2) networkctl status

And collect the contents of /run/systemd/network and attach to the bug?

Claudio Ruta (cruta) wrote :

Hi Ryan,

following the output required:

root@UBUNTIPL:/# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enc2e02: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1492 qdisc fq_codel state UP group default qlen 1000
    link/ether 02:00:00:00:02:7b brd ff:ff:ff:ff:ff:ff
    inet 9.30.243.118/22 brd 9.30.243.255 scope global noprefixroute enc2e02
       valid_lft forever preferred_lft forever
    inet6 fe80::200:0:200:27b/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

root@UBUNTIPL:/# networkctl status
● State: routable
       Address: 9.30.243.118 on enc2e02
                fe80::200:0:200:27b on enc2e02
       Gateway: 9.30.240.1 on enc2e02

root@UBUNTIPL:/# cd /run/systemd/network
bash: cd: /run/systemd/network: No such file or directory

Thanks in advanced for your support

On Tue, Dec 4, 2018 at 4:32 AM Claudio Ruta <email address hidden>
wrote:

> Hi Ryan,
>
> following the output required:
>
> root@UBUNTIPL:/# ip a
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group
> default qlen 1000
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> inet 127.0.0.1/8 scope host lo
> valid_lft forever preferred_lft forever
> inet6 ::1/128 scope host
> valid_lft forever preferred_lft forever
> 2: enc2e02: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1492 qdisc fq_codel
> state UP group default qlen 1000
> link/ether 02:00:00:00:02:7b brd ff:ff:ff:ff:ff:ff
> inet 9.30.243.118/22 brd 9.30.243.255 scope global noprefixroute
> enc2e02
> valid_lft forever preferred_lft forever
> inet6 fe80::200:0:200:27b/64 scope link noprefixroute
> valid_lft forever preferred_lft forever
>
> root@UBUNTIPL:/# networkctl status
> ● State: routable
> Address: 9.30.243.118 on enc2e02
> fe80::200:0:200:27b on enc2e02
> Gateway: 9.30.240.1 on enc2e02
>
> root@UBUNTIPL:/# cd /run/systemd/network
> bash: cd: /run/systemd/network: No such file or directory
>

Something's not right. If you've got netplan.io installed and a file in
/etc/netplan/*.yaml and it's valid, then it
writes out a networkd configuration to
/run/systemd/network/10-netplan-<interface>.network

So run and capture the following output

1) lsb_release -rd
2) apt-cache policy netplan.io
3) apt-cache policy systemd
4) ls -al /etc/netplan/
5) netplan --debug apply
6) ls -al /run/systemd/network

>
>

Claudio Ruta (cruta) wrote :

following the output required:
root@UBUNTIPL:~# lsb_release -rd
Description: Ubuntu 18.04.1 LTS
Release: 18.04

root@UBUNTIPL:~# apt-cache policy netplan.io
netplan.io:
  Installed: 0.36.3
  Candidate: 0.36.3
  Version table:
 *** 0.36.3 500
        500 http://us.ports.ubuntu.com/ubuntu-ports bionic-updates/main s390x Packages
        100 /var/lib/dpkg/status
     0.36.1 500
        500 http://us.ports.ubuntu.com/ubuntu-ports bionic/main s390x Packages

root@UBUNTIPL:~# apt-cache policy systemd
systemd:
  Installed: 237-3ubuntu10.3
  Candidate: 237-3ubuntu10.9
  Version table:
     237-3ubuntu10.9 500
        500 http://us.ports.ubuntu.com/ubuntu-ports bionic-updates/main s390x Packages
        500 http://ports.ubuntu.com/ubuntu-ports bionic-security/main s390x Packages
 *** 237-3ubuntu10.3 100
        100 /var/lib/dpkg/status
     237-3ubuntu10 500
        500 http://us.ports.ubuntu.com/ubuntu-ports bionic/main s390x Packages

root@UBUNTIPL:~# ls -al /etc/netplan/
total 24
drwxr-xr-x 2 root root 4096 Nov 27 05:01 .
drwxr-xr-x 132 root root 12288 Oct 24 06:08 ..
-rw-r--r-- 1 root root 346 Oct 24 07:22 01-netcfg.yaml
-rw-r--r-- 1 root root 104 Oct 24 05:57 01-network-manager-all.yaml

root@UBUNTIPL:~# netplan --debug apply
** (generate:4189): DEBUG: 11:01:55.195: Processing input file //etc/netplan/01-netcfg.yaml..
** (generate:4189): DEBUG: 11:01:55.196: starting new processing pass
** (generate:4189): DEBUG: 11:01:55.196: Processing input file //etc/netplan/01-network-manager-all.yaml..
** (generate:4189): DEBUG: 11:01:55.196: starting new processing pass
** (generate:4189): DEBUG: 11:01:55.196: enc2e02: setting default backend to 2
** (generate:4189): DEBUG: 11:01:55.196: Generating output files..
** (generate:4189): DEBUG: 11:01:55.196: networkd: definition enc2e02 is not for us (backend 2)
DEBUG:no netplan generated networkd configuration exists
DEBUG:netplan generated NM configuration exists, restarting NM
DEBUG:device lo operstate is unknown, not replugging
DEBUG:netplan triggering .link rules for lo
DEBUG:device enc2e02 operstate is up, not replugging
DEBUG:netplan triggering .link rules for enc2e02

root@UBUNTIPL:~# ls -al /run/systemd/network
ls: cannot access '/run/systemd/network': No such file or directory

Thanks

Ryan Harper (raharper) wrote :

On Tue, Dec 4, 2018 at 10:11 AM Claudio Ruta <email address hidden>
wrote:

> f
> root@UBUNTIPL:~# ls -al /etc/netplan/
> total 24
> drwxr-xr-x 2 root root 4096 Nov 27 05:01 .
> drwxr-xr-x 132 root root 12288 Oct 24 06:08 ..
> -rw-r--r-- 1 root root 346 Oct 24 07:22 01-netcfg.yaml
> -rw-r--r-- 1 root root 104 Oct 24 05:57 01-network-manager-all.yaml
>

Can you move 01-network-manager-all.yaml out of the way?

It appears that file tells netplan that it doesn't need to generate any
config for
interfaces that are managaged by systemd.

see below

>
>
> root@UBUNTIPL:~# netplan --debug apply
> ** (generate:4189): DEBUG: 11:01:55.195: Processing input file
> //etc/netplan/01-netcfg.yaml..
> ** (generate:4189): DEBUG: 11:01:55.196: starting new processing pass
> ** (generate:4189): DEBUG: 11:01:55.196: Processing input file
> //etc/netplan/01-network-manager-all.yaml..
> ** (generate:4189): DEBUG: 11:01:55.196: starting new processing pass
> ** (generate:4189): DEBUG: 11:01:55.196: enc2e02: setting default backend
> to 2
> ** (generate:4189): DEBUG: 11:01:55.196: Generating output files..
> ** (generate:4189): DEBUG: 11:01:55.196: networkd: definition enc2e02 is
> not for us (backend 2)
>

This line here indicates that the config found for enc2e02 (in
01-netcfg.yaml) isn't managed by networkd
since netplan also found the global config to enable NetworkManager (in
01-network-manager-all.yaml).

The default system configuration is to use NetworkManager for any wifi
devices, and networkd for all other
devices. Was there a reason you added the 01-network-manager-all.yaml ? Do
you want to manage the
interface with NetworkManager or Networkd?

Claudio Ruta (cruta) wrote :

Hi Ryan,

great !
You are right.

I moved the 01-network-manager-all.yaml and the IP change now works...

Following the debugs process:

root@UBUNTIPL:/etc/netplan# rm 01-network-manager-all.yaml
root@UBUNTIPL:/etc/netplan# netplan --debug apply
** (generate:4760): DEBUG: 12:14:53.205: Processing input file //etc/netplan/01-netcfg.yaml..
** (generate:4760): DEBUG: 12:14:53.205: starting new processing pass
** (generate:4760): DEBUG: 12:14:53.205: enc2e02: setting default backend to 1
** (generate:4760): DEBUG: 12:14:53.205: Generating output files..
** (generate:4760): DEBUG: 12:14:53.205: NetworkManager: definition enc2e02 is not for us (backend 1)
DEBUG:netplan generated networkd configuration exists, restarting networkd
DEBUG:no netplan generated NM configuration exists
DEBUG:device lo operstate is unknown, not replugging
DEBUG:netplan triggering .link rules for lo
DEBUG:device enc2e02 operstate is up, not replugging
DEBUG:netplan triggering .link rules for enc2e02

I think now the problem is solved, is true?
Anyway, I don't understanding because the file 01-network-manager-all.yaml was present in the /etc/netpaln directory... is a bug or a my specific installation problem?
Let me know...
Many Thanks for your attention and support

Ciao

Ryan Harper (raharper) wrote :

On Tue, Dec 4, 2018 at 11:41 AM Claudio Ruta <email address hidden>
wrote:

> Hi Ryan,
>
> great !
> You are right.
>
> I moved the 01-network-manager-all.yaml and the IP change now works...
>
> Following the debugs process:
>
> root@UBUNTIPL:/etc/netplan# rm 01-network-manager-all.yaml
> root@UBUNTIPL:/etc/netplan# netplan --debug apply
> ** (generate:4760): DEBUG: 12:14:53.205: Processing input file
> //etc/netplan/01-netcfg.yaml..
> ** (generate:4760): DEBUG: 12:14:53.205: starting new processing pass
> ** (generate:4760): DEBUG: 12:14:53.205: enc2e02: setting default backend
> to 1
> ** (generate:4760): DEBUG: 12:14:53.205: Generating output files..
> ** (generate:4760): DEBUG: 12:14:53.205: NetworkManager: definition
> enc2e02 is not for us (backend 1)
> DEBUG:netplan generated networkd configuration exists, restarting networkd
> DEBUG:no netplan generated NM configuration exists
> DEBUG:device lo operstate is unknown, not replugging
> DEBUG:netplan triggering .link rules for lo
> DEBUG:device enc2e02 operstate is up, not replugging
> DEBUG:netplan triggering .link rules for enc2e02
>
> I think now the problem is solved, is true?
> Anyway, I don't understanding because the file 01-network-manager-all.yaml
> was present in the /etc/netpaln directory... is a bug or a my specific
> installation problem?
> Let me know...
>

 It looks like if your image came from an Ubuntu Desktop ISO install, it
will put that file in place as the Ubuntu
Desktop uses NetworkManager to control network configuration.

https://blog.ubuntu.com/2017/12/01/ubuntu-bionic-netplan

Many Thanks for your attention and support
>
> Ciao
>
> --
> You received this bug notification because you are subscribed to
> netplan.
> Matching subscriptions: netplan
> https://bugs.launchpad.net/bugs/1799695
>
> Title:
> I find problems to change the IP address on Ubuntu 18.04
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/netplan/+bug/1799695/+subscriptions
>

Claudio Ruta (cruta) wrote :

Hi,

thanks again for your support.

From my point of view my issue is solved.
Now, I'm able to change the IP address.

Do I have to do some action about this request or provide you to close successfully it?

Let me know

Regards

Ryan Harper (raharper) wrote :

On Wed, Dec 5, 2018 at 6:31 AM Claudio Ruta <email address hidden>
wrote:

> Hi,
>
> thanks again for your support.
>
> >From my point of view my issue is solved.
> Now, I'm able to change the IP address.
>
> Do I have to do some action about this request or provide you to close
> successfully it?
>

I'll close.

>
> Let me know
>
> Regards
>
> --
> You received this bug notification because you are subscribed to
> netplan.
> Matching subscriptions: netplan
> https://bugs.launchpad.net/bugs/1799695
>
> Title:
> I find problems to change the IP address on Ubuntu 18.04
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/netplan/+bug/1799695/+subscriptions
>

Ryan Harper (raharper) wrote :

Actually,

Can you provide any more information about these steps?

"I mounted the ubuntu-18.04.1-server-s390x.iso image and received the installation files for RDR IPL."

From where was the ISO downloaded? And what is RDR and what files were provided?

I looked at contents of http://cdimage.ubuntu.com/releases/18.04.1/release/ubuntu-18.04.1-server-s390x.iso and I'm not finding the 01-network-manager-all.yaml so I'm still confused from this file came.

Claudio Ruta (cruta) wrote :

Hi,

I download the iso image from this link:
https://www.ubuntu.com/download/server/thank-you-s390x

The Ubuntu 18.04 image for LinuxONE and z Systems available it's this one:
ubuntu-18.04.1-server-s390x.iso

The RDR is a virtual reader under z/VM.
Is used to send and receive files from/to other virual machines and also for other specific scope.

On following link are reported the z/VM installation steps:
https://wiki.ubuntu.com/S390X/Installation%20In%20zVM

Regards

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers