SSH times out after I installed "Server with GUI" on a CentOS 8 stream VM

Issues related to applications and software problems and general support
feacluster
Posts: 23
Joined: 2017/11/28 14:48:49

Re: SSH times out after I installed "Server with GUI" on a CentOS 8 stream VM

Post by feacluster » 2021/12/03 02:58:37

jlehtone wrote:
2021/12/01 07:45:39
When was NetworkManager installed? You see that with:

Code: Select all

dnf history list NetworkManager
All dnf transactions:

Code: Select all

dnf history
IF groupinstall "Server with GUI" is the earliest transaction that involved NetworkManager,
THEN the network was not configured with NetworkManager and you should not install NetworkManager at all.
That is, should not install the entire Server with GUI subset of packages.
Thanks, here's the output of the commands you suggested. I switched from "Server with GUI" to "workstation" to see if that might fix my issue. But seems it behaves the same with regards to Networkmanager.:

Code: Select all

[feacluster@instance-4 ~]$ dnf history list NetworkManager
ID     | Command line                                                                                                    | Date and time    | Action(s)      | Altered
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
     8 | groupinstall workstation                                                                                        | 2021-12-03 02:41 | I, U           | 1053 E<
     1 |                                                                                                                 | 2021-09-16 15:28 | Install        |  411 >E
[feacluster@instance-4 ~]$ dnf history
ID     | Command line                                                                                                    | Date and time    | Action(s)      | Altered
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
     8 | groupinstall workstation                                                                                        | 2021-12-03 02:41 | I, U           | 1053 EE
     7 | install wget -y                                                                                                 | 2021-12-03 02:37 | Install        |    2
     6 | install p7zip -y                                                                                                | 2021-12-03 02:37 | Install        |    1
     5 | install epel-release -y                                                                                         | 2021-12-03 02:37 | Install        |    2
     4 | install nano bzip2 ncompress unzip -y                                                                           | 2021-12-03 02:37 | Install        |    4
     3 | install -y google-cloud-sdk                                                                                     | 2021-09-16 15:33 | Install        |    7
     2 | install -y google-compute-engine google-osconfig-agent gce-disk-expand                                          | 2021-09-16 15:32 | Install        |    8 EE
     1 |                                                                                                                 | 2021-09-16 15:28 | Install        |  411 EE

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: SSH times out after I installed "Server with GUI" on a CentOS 8 stream VM

Post by jlehtone » 2021/12/03 06:34:39

Ok, the NetworkManager seems to be installed from start.

Therefore, issue revealed by networkmanager-config-server is that the network seems to be autoconfigured. That is, not explicitly configured.

That gives two questions:
  1. What is the initial network configuration, before you install any additional packages?
  2. How could it be converted into explicit configuration that is not affected by the 'no-auto-default'?
A mere rename of connection might be enough for the latter:

Code: Select all

nmcli con mod 'Wired connection 1' connection.id lan

feacluster
Posts: 23
Joined: 2017/11/28 14:48:49

Re: SSH times out after I installed "Server with GUI" on a CentOS 8 stream VM

Post by feacluster » 2021/12/05 05:54:40

jlehtone wrote:
2021/12/03 06:34:39
Ok, the NetworkManager seems to be installed from start.

Therefore, issue revealed by networkmanager-config-server is that the network seems to be autoconfigured. That is, not explicitly configured.

That gives two questions:
  1. What is the initial network configuration, before you install any additional packages?
  2. How could it be converted into explicit configuration that is not affected by the 'no-auto-default'?
A mere rename of connection might be enough for the latter:

Code: Select all

nmcli con mod 'Wired connection 1' connection.id lan
Unfortunately, I do not have any control over the initial network configuration. This is done by Google Compute Engine when it launches the VM.

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: SSH times out after I installed "Server with GUI" on a CentOS 8 stream VM

Post by jlehtone » 2021/12/05 10:34:05

feacluster wrote:
2021/12/05 05:54:40
Unfortunately, I do not have any control over the initial network configuration.
If Google is anything like OpenStack, then the options of the creation command affect what it creates.

However, that is not the point. Google does whatever it does. The result is your "starting point".
Your VM has some configuration. Knowing more about what it is and what Google did would be "fun", but not essential.

What is essential is that your first action has been "install environment" and that does change the config.
Starting point + environment => no network

Since you can change the config, change the config first so that the installation of additional packages does not mess up.
Starting point

Code: Select all

ls /etc/sysconfig/network-scripts
nmcli con mod 'Wired connection 1' connection.id lan
ls /etc/sysconfig/network-scripts
dnf install ...

feacluster
Posts: 23
Joined: 2017/11/28 14:48:49

Re: SSH times out after I installed "Server with GUI" on a CentOS 8 stream VM

Post by feacluster » 2021/12/06 23:07:05

jlehtone wrote:
2021/12/05 10:34:05
feacluster wrote:
2021/12/05 05:54:40
Unfortunately, I do not have any control over the initial network configuration.
If Google is anything like OpenStack, then the options of the creation command affect what it creates.

However, that is not the point. Google does whatever it does. The result is your "starting point".
Your VM has some configuration. Knowing more about what it is and what Google did would be "fun", but not essential.

What is essential is that your first action has been "install environment" and that does change the config.
Starting point + environment => no network

Since you can change the config, change the config first so that the installation of additional packages does not mess up.
Starting point

Code: Select all

ls /etc/sysconfig/network-scripts
nmcli con mod 'Wired connection 1' connection.id lan
ls /etc/sysconfig/network-scripts
dnf install ...
It sounds like this is more a Google cloud issue than CentOS issue? If so, I'll report it to them to see if they have a fix. I guess I am confused why installing the gui desktop installs Network-Manager and then changes the config of the network ? I don't recall CentOS 7 doing that.

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: SSH times out after I installed "Server with GUI" on a CentOS 8 stream VM

Post by jlehtone » 2021/12/07 06:31:13

feacluster wrote:
2021/12/06 23:07:05
It sounds like this is more a Google cloud issue than CentOS issue?
Not really.

It does seem that Google installs the NetworkManager and provides DHCP but does not create explicit config.
The default behaviour of NetworkManager is to start connection connection for each interface; the instance gets network on boot.

You change the behaviour of NetworkManager without compensating.
You should create explicit config for the connection before installing packages that affect behaviour.
That solves the problem. That prevents creation of the (no net) problem.

Should Google document that their base install works on defaults; that they don't inject custom config?
Probably.

Should user understand how system operates? IMHO, definitely.

Why does Google's CentOS Linux 7 instance differ from CentOS Stream 8 instance? No idea.

feacluster
Posts: 23
Joined: 2017/11/28 14:48:49

Re: SSH times out after I installed "Server with GUI" on a CentOS 8 stream VM

Post by feacluster » 2021/12/09 14:37:21

jlehtone wrote:
2021/12/07 06:31:13
You change the behaviour of NetworkManager without compensating.
Guess I am not understanding why installing "Workstation" or "Server with GUI" needs to change the behavior of NetworkManager? What changed between Centos 7 and 8 stream for that to happen? And where should I report this issue ( if it is an issue ?)

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: SSH times out after I installed "Server with GUI" on a CentOS 8 stream VM

Post by jlehtone » 2021/12/09 16:05:32

Code: Select all

[CentOS 7]$ repoquery --groupmember NetworkManager-config-server
1:NetworkManager-config-server-1.18.8-2.el7_9.noarch
[CentOS 7]$ repoquery --whatrequires NetworkManager-config-server
[CentOS 7]$
NetworkManager-config-server is not in any yum group and will not be installed as dependency. You get it only if you install it explicitly.

I don't have C8S, so peek the closest that I do, AlmaLinux:

Code: Select all

[AL8]$ dnf -q rq --whatrequires NetworkManager-config-server
[AL8]$ dnf -q rq --groupmember NetworkManager-config-server
NetworkManager-config-server-1:1.32.10-4.el8.noarch
  @server-product

[AL8]$ dnf -q group info server-product

Group: Server product core
 Description: Packages mandatory for the server product.
 Mandatory Packages:
   almalinux-release
   chrony
   polkit
   realmd
   timedatex
 Default Packages:
   NetworkManager-config-server
   NetworkManager-team
NetworkManager-config-server is in yum group server-product.
The server-product (Server product core) is in Server with GUI but not in Workstation:

Code: Select all

[AL8]$ dnf -q group info "Server with GUI"
Environment Group: Server with GUI
 Description: An integrated, easy-to-manage server with a graphical interface.
no group 'dns-server' from environment 'graphical-server-environment'
 Mandatory Groups:
   Common NetworkManager submodules
   Container Management
   Core
   Fonts
   GNOME
   Guest Desktop Agents
   Hardware Monitoring Utilities
   Hardware Support
   Headless Management
   Input Methods
   Internet Browser
   Multimedia
   Printing Client
   Server product core
   Standard
   base-x
 Optional Groups:
   Basic Web Server
   Debugging Tools
   FTP Server
   File and Storage Server
   Guest Agents
   Infiniband Support
   Mail Server
   Network File System Client
   Network Servers
   Performance Tools
   Remote Desktop Clients
   Remote Management for Linux
   Virtualization Client
   Virtualization Hypervisor
   Virtualization Tools
   Windows File Server

[AL8]$ dnf -q group info "Workstation"
Environment Group: Workstation
 Description: Workstation is a user-friendly desktop system for laptops and PCs.
 Mandatory Groups:
   Common NetworkManager submodules
   Core
   Fonts
   GNOME
   Guest Desktop Agents
   Hardware Support
   Internet Browser
   Multimedia
   Printing Client
   Standard
   Workstation product core
   base-x
 Optional Groups:
   Backup Client
   GNOME Applications
   Headless Management
   Internet Applications
   Office Suite and Productivity
   Remote Desktop Clients
   Smart Card Support
AFAIK, C8S packages and hence the repository metadata definitions are created by RHEL engineers.

If you do use installer to create C8S setup, the installer generates configs for network connections.
Therefore, the installation of NetworkManager-config-server does not have observable effect.

Google has created their C8S image without generating those configs. There the no-auto-default=* does make a difference.

Post Reply