| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
NetworkDevice.get() only takes one argument, iow its not like the
standard get on a dictionary. This patch fixes the assumption that it
is thereby fixing a backtrace when using static ip configuration.
|
|
|
|
|
|
|
|
|
| |
Add a dracutSetupString method to network.py, this can be used to
ask the Network class to get a dracut setup string to setup the interface
needed for a connection to a certain host.
This patch also adds code to booty to use this to get kernel cmdline dracut
setup commands for any NIC's needed to connect to devices needed for /
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make ifcfg configuration files getting parsed properly after update. The used
inotify configuration update mechanism (ifcfg-rh NM plugin) requires 1) writing
of new files out of /etc/sysconfig/network-scripts dir so that it doesn't
trigger parsing of the file too early (before all is written), and more
importantly, 2) removing of the old files before moving the new ones in so that
the new file gets parsed and the respective connection gets re-read and
eventually activated.
Also make sure that only device selected in UI has ONBOOT set to yes
in case of selection of another device after fail.
|
|
|
|
|
|
|
|
|
|
| |
Write out NM_CONTROLLED=no for NICs used for FCoE, note that unlike with
iSCSI we do not blindly write out NM_CONTROLLED=no for all NICs, but just
for the NIC which is used for FCoE.
The iSCSI behaviour is undesirable, but the whole writing of NM_CONTROLLED=no
for iSCSI will go away as soon as NetworkManager is fixed to not down
devices when it takes over control, which should be fixed soon.
|
|
|
|
|
| |
Note: Compared to writing out of our own /etc/hosts which was removed in
bug 491808, we do not write line for host's IP address.
|
| |
|
|
|
|
|
|
|
|
| |
The only value we care about for NM_CONTROLLED is 'no', so change test
to work that way. If performing a livecd install, make sure to carry
over any NM_CONTROLLED settings in the ifcfg-* files on the live CD.
Users with custom live images may have that set, so we should preserve
it.
|
|
|
|
|
|
| |
If doing a LiveCD install, make sure we write out HOSTNAME= in
/etc/sysconfig/network and set it to the value entered in anaconda
rather than localhost.localdomain.
|
|
|
|
|
| |
Not really necessary in the ifcfg files, so avoid writing out this value
in network.py.
|
|
|
|
|
|
|
|
|
|
| |
Remove minihal.py and use NetworkManager to get a list of device names
and their hardware addresses. Still have to talk to hal via D-Bus to
build a description string, but the hal path is given to us by
NetworkManager, so we are sure we are only building a list of interfaces
that NetworkManager knows about and can communicate with.
Also rewrite command-stubs/list-harddrives to not use minihal.
|
|
|
|
|
|
| |
The setup package owns /etc/hosts and NetworkManager manages it once the
system is running, so anaconda no longer needs to write out information
to /etc/hosts during installation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch renames storage.NetworkDevice to storage.NetworkStorageDevice,
as NetworkDevice as classname also is used in network.py .
It also changes NetworkStorageDevice so that it does not inherit from Device,
as it is now intended for use in multiple inheritance together with
StorageDevice (or a derived class) as explained further in the comments
in the code.
Then this patch changes iScsiDiskDevice and NFSDevice to additional inherit
from NetworkStorageDevice (next to what they were already inheriting from.
And last if fixes the code in network.py to properly write NM_CONTROLLED=NO
when / uses a network backed device.
|
|
|
|
|
| |
There's no more isNetdev method, so we'll have to use the type of the object
as a test instead.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're trying to cover two scenarios with a single if statement:
The scenario pre-install where we're writing out files to the
tmpfs in order to bring up the network.
The scenario post-install where we're writing out files to the
installed system for network on reboot.
We're also trying to preserve any files that may be in the installed
filesystem post-install time. The logic should now handle this.
Signed-off-by: David Cantrell <dcantrell@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This fixes network bringup in anaconda itself where instPath is
still ''. We were finding the pre-written stub config files outside
of /mnt/sysimage and skipping any modifications to them. This
kept NetworkManager from bringing up the device.
Signed-off-by: David Cantrell <dcantrell@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not write the FQDN to the localhost line, only write the short
hostname if it's something other than 'localhost'. Only write the
FQDN line to /etc/hosts if we have an IP address for the host.
Without this patch, users performing media installs who enter an
FQDN in the hostname field end up with their FQDN == 127.0.0.1,
which messes up things, such as sendmail. Writing the short name
is what we really want here.
[rawhide]
|
|
|
|
|
|
|
|
|
|
| |
The vendor-class setting gets written to this file during installation,
but we need to copy the file to the target system to make sure it's
present on reboot. Previously, we wrote this to the ifcfg file for
_something_ that read it, but it doesn't look like anything reads it
from this location anymore (or ever).
[rawhide]
|
|
|
|
|
|
|
|
| |
We have been writing the SEARCH= line to ifcfg files in network.py
for a while, but it only contains the domain we extract from the
FQDN. For users wanting to use the network service over NM, this
presents a problem because the SEARCH line present in the ifcfg
file will always override the information from the DHCP server.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The suggestion for this patch came from OLPC (or someone with an
@laptop.org email address). The user was doing a kickstart install
and adding a local yum repo that provided an RPM of site-specific
configuration files, including ifcfg-DEVICE files. This package
would get installed just fine, but then anaconda drives over the
configuration files after package installation.
If we see any configuration file on the target system during
installation, skip over it and don't write a new one. This
should handle upgrades and kickstart install types like OLPC was
describing.
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you are installing in a KVM guest and pass 'vnc' on the boot line,
getDefaultHostname() in network.py will traceback because anaconda.id
contains nothing in this particular use case. Wrap the offending
line in try/except and fall back on None if we can't pick the hostname
from anaconda.id.network.
For KVM installs, this causes vnc.py to report 'Please connect your
vnc client to IPADDRESS:DISPLAY to begin the install', which is good
enough for me.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The VNC launch code in vnc.py needed an update to work better with
NetworkManager. When collecting the hostname and IP address, it was
assuming the first device in the netdevices list is our active NIC,
which may or may not be true.
Added getActiveNetDevs() in network.py to ask NetworkManager for a
list of all currently configured interfaces. Return a list of
device names. A list seems a bit pointless, but I'd like to have
this in place now for future improvements where we might need to
handle more than one active NIC during installation. After all,
NM can do that.
The message reported by anaconda once VNC is ready will contain the
FQDN:DISPLAY_NUMBER (IP ADDRESS), if it can. If it can't find your
IP address, it leaves that out. If it can't find your hostname, it
also leaves that out.
|
|
|
|
|
|
|
|
|
| |
Fixes a traceback seen where network.py tries to copy /etc/resolv.conf
to /etc/resolv.conf. The original fix was to get DNS working in %post
scripts during kickstart installs, but that fix assumed that when were
in this block, instPath would be something (such as /mnt/sysimage).
Only copy when instPath is some value other than ''.
|
| |
|
| |
|
|
|
|
|
| |
Copy over /etc/resolv.conf to /mnt/sysimage/etc/resolv.conf so that
%post scripts can succeed with DNS lookups.
|
|
|
|
|
|
| |
network.py was still using this directory. Ooops. The bug also
notes that /.dbus appears, but I cannot find anywhere in the
anaconda code where we create /.dbus.
|
|
|
|
|
|
| |
Let network.bringUp() work by calling network.write() with no
parameters. bringUp() is used to bring up networking during
installation.
|
|
|
|
|
| |
Tell NetworkManager not to touch anaconda configured interfaces when / is
on a network based device.
|
| |
|
|
|
|
|
| |
nm-system-settings only reads NM_CONTROLLED=no to know to ignore a
device. By default, it assumes control of all devices.
|
|
|
|
| |
If a host is unknown, socket.gethostbyaddr() gives us a 2-tuple.
|
|
|
|
|
|
| |
NetworkManager stopped providing the Hostname property (thanks!),
so get the IP address now and shove that through gethostbyaddr() and
see if it produces anything useful.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Similar to the change to writeEnabledNetInfo(). Write new files
somewhere else, then move them in place.
|
| |
|
|
|
|
|
| |
If the user supplies ksdevice=link, make sure we automatically
select the first network device found that has an active link.
|
|
|
|
|
|
| |
If you boot with boot.iso and pass ksdevice=DEVICE or
ksdevice=MACADDR, use that to automatically select the NIC to use
when we ask the user to bring up the network for installation.
|
| |
|
|
|
|
| |
Patch from Thomas Woerner <twoerner AT redhat DOT com>.
|
|
|
|
|
|
|
|
| |
Set up /etc/hosts correctly if the user enters a hostname or an FQDN
in the hostname screen in anaconda. This avoids name resolution
problems when starting sendmail.
Patch from Thomas Woerner <twoerner AT redhat DOT com>.
|
| |
|
|
|
|
|
|
|
|
|
| |
Bring back the isys.resetResolv() function to kick glibc and make it
reinitialize itself from /etc/resolv.conf again. We need to do this
to account for NetworkManager writing out a new resolv.conf.
In network.bringUp(), init i to 0 so we actually loop and poll
NetworkManager's state.
|
|
|
|
|
|
|
|
| |
After writing new networking settings, check the State property
from NetworkManager to see if we are connected. Return True if
we ever see state go to connected, False otherwise. Idea here
is that the interface code can pop up an error if we get False
from this function.
|
|
|
|
|
|
| |
At least for now, I see no need for firstnetdevice in the same way
before we started using NetworkManager. Might have to come back
for specific cases, but I don't think it's necessary.
|
|
|
|
|
|
| |
If instPath is empty, it means bringUp() has been called to kick out
new network configuration files for use during installation. Do not
try to write out udev.d files during installation.
|
|
|
|
|
|
|
| |
Changed bringDeviceUp() in network.py to bringUp() since it really
just writes out all new network configuration information and lets
NetworkManager take over from there. Correct the calls to this
method so we don't get tracebacks anymore.
|