I also modified restart-services.trigger to start nfs if nfs is not running on 
my cobbler server. My cobbler server and is also my nfs server for kickstarts.

You also need to add the variable manage_nfs: 1 to /etc/cobbler settings
Here is the modified code:



#!/usr/bin/python

import cobbler.api as capi
import os
import sys

bootapi = capi.BootAPI()
settings = bootapi.settings()
manage_dhcp = str(settings.manage_dhcp).lower()
manage_dns = str(settings.manage_dns).lower()
manage_nfs = str(settings.manage_nfs).lower()
restart_dhcp = str(settings.restart_dhcp).lower()
restart_dns = str(settings.restart_dns).lower()
omapi_enabled = settings.omapi_enabled
omapi_port = settings.omapi_port

# load up our DHCP and DNS modules
bootapi.get_sync()
# bootapi.dhcp and bootapi.dns are now module references

# special handling as we don't want to restart it twice has_restarted_dnsmasq = 
False

def nfsStatus(nfs):
  if nfs != "0":
     commandString = "/sbin/service nfs status|/bin/awk '/nfsd/{print $NF}'"
     nfs_status = os.popen(commandString).readlines()
     if nfs_status == ['stopped\n']:
         print
         rc = os.system("/sbin/service nfs start")
         return rc
rc = 0
if manage_dhcp != "0":
    if bootapi.dhcp.what() == "isc":
        if not omapi_enabled and restart_dhcp:
            rc = os.system("/sbin/service dhcpd restart")
    elif bootapi.dhcp.what() == "dnsmasq":
        if restart_dhcp:
            rc = os.system("/sbin/service dnsmasq restart")
            has_restarted_dnsmasq = True
    else:
        print "- error: unknown DHCP engine: %s" % bootapi.dhcp.what()
        rc = 411

if manage_dns != "0" and restart_dns:
    if bootapi.dns.what() == "bind":
        rc = os.system("/sbin/service named restart")
    elif bootapi.dns.what() == "dnsmasq" and not has_restarted_dnsmasq:
        rc = os.ssytem("/sbin/service dnsmasq restart")

nfsStatus(manage_nfs)

sys.exit(rc)


Joseph Boyer Jr
Enterprise Technology Services
Liquidnet Holdings, Inc.
[EMAIL PROTECTED]
T   +1 646.660.8352
C   +1 646.284.8394


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joseph Boyer Jr.
Sent: Friday, October 03, 2008 10:34 AM
To: cobbler mailing list
Subject: RE: RH NFS TCP UDP installs

Tim,

I use the nfs string you mention below in my kickstart template and have added 
these variables to my /etc/cobbler/settings so that cobbler picks them up when 
it generates the ks.cfg

The vars are:

Nfs_server: 'ip address'
Nfs_distro_root: 'my distro path'


-joe

Joseph Boyer Jr
Enterprise Technology Services
Liquidnet Holdings, Inc.
[EMAIL PROTECTED]
T   +1 646.660.8352
C   +1 646.284.8394


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim French
Sent: Thursday, October 02, 2008 6:11 PM
To: cobbler mailing list
Subject: RH NFS TCP UDP installs

I know it's not a cobbler question but maybe someone has run into this
prob.

It seems that RH (and thus cobbler) uses UDP for NFS kickstarts.

How are folks NFS kickstarting with their Filers using NFS over TCP?

The official RH line is to use a boot command line option for RH4.


Further research shows:

It look like adding
--opts=tcp to the nfs line in the ks file would works.

Since the ks file is generated on-the-fly how do I get something that
looks like this

# INSTALLATION TYPE
nfs --server $nfs_server --dir $nfs_distro_root/$distro  --opts=tcp


Timothy French          <[EMAIL PROTECTED]>
Office of Information Technology, University of Utah
Key fingerprint = 838C F04D AAC8 6D9C 7ED7  2629 925E BF3E 1FD1 826C
This is a bit kludgy, so you might want to rethink why you want to do it.
_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler


_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler


_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to