[PATCH] Minor fix for IE
by Simon Woolsgrove
Afraid many users have to use IE 6 so these address some issues we have seen with the WebUI. IE not showing system MAC address and box model issue with div#main. Not sure if these are the best fixes. There is also the png transparency issue ... I love browser standards ...
Cheers,
Simon
--- a/webui_templates/system_edit.tmpl
+++ b/webui_templates/system_edit.tmpl
@@ -818,14 +818,14 @@ redhatmanagementserver"
#set inames = $system.interfaces.keys()
#set nothing = $inames.sort()
#for $iname in $inames
- <option name="$iname"
+ <option name="$iname" value="$iname"
#if $iname == "eth0"
selected="1"
#end if
>$iname</option>
#end for
#else
- <option name="eth0" selected="1">eth0</option>
+ <option name="eth0" value="eth0" selected="1">eth0</option>
#end if
</select>
<p class="context-tip">Select what interface to edit below</p>
index 6d9f8cc..b5fe09d 100644
--- a/webui_content/style.css
+++ b/webui_content/style.css
@@ -99,6 +99,7 @@ div#feed ul {
}
div#main {
+ height: 95%;
background-color: #212121;
border-top: 1px solid #C88800;
border-bottom: 1px solid #C88800;
index 2544576..632975f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -25,6 +25,7 @@ Cobbler CHANGELOG
- (BUGF) fix stderr output on Ctrl+C
- (BUGF) potential performance savings WRT duplicate python objects
- (BUGF) don't deserialize during sync, it makes it take twice as long
+- (BUGF) fix ie browser issue showing system mac and div#main
- Tue Mar 3 2009 - 1.4.3
- (BUGF) fix OMAPI support's (note: deprecated) usage of subproces
15 years, 1 month
[PATCH] VM AutoBoot re-post
by Adam Rosenwald
Reposting with `git-format-patch` output (i.e. `git-format-patch -1`)...
FYI, Adam.
From ee8f57a87faa17daa4772befcd1fd26bf3b5a753 Mon Sep 17 00:00:00 2001
From: ARos <thestrider@gmailcom>
Date: Mon, 23 Mar 2009 21:52:31 +0000
Subject: [PATCH] VM AutoBoot feature
---
cobbler/collection.py | 1 +
cobbler/item_image.py | 9 +++++++++
cobbler/item_profile.py | 9 +++++++++
cobbler/item_system.py | 9 +++++++++
cobbler/remote.py | 2 ++
cobbler/settings.py | 1 +
cobbler/utils.py | 22 ++++++++++++++++++++++
contrib/ruby/lib/cobbler/image.rb | 2 +-
contrib/ruby/lib/cobbler/profile.rb | 1 +
contrib/ruby/lib/cobbler/system.rb | 1 +
contrib/ruby/test/test_image.rb | 2 ++
contrib/ruby/test/test_profile.rb | 2 ++
contrib/ruby/test/test_system.rb | 2 ++
installer_templates/settings.template | 5 +++++
webui_templates/image_edit.tmpl | 15 +++++++++++++++
webui_templates/profile_edit.tmpl | 13 +++++++++++++
webui_templates/search.tmpl | 3 +++
webui_templates/system_edit.tmpl | 12 ++++++++++++
18 files changed, 110 insertions(+), 1 deletions(-)
diff --git a/cobbler/collection.py b/cobbler/collection.py
index 36c58b0..dec7b76 100644
--- a/cobbler/collection.py
+++ b/cobbler/collection.py
@@ -105,6 +105,7 @@ class Collection(serializable.Serializable):
'inherit' : 'parent',
'ip' : 'ip_address',
'mac' : 'mac_address',
+ 'virt-auto-boot' : 'virt_auto_boot',
'virt-file-size' : 'virt_file_size',
'virt-ram' : 'virt_ram',
'virt-path' : 'virt_path',
diff --git a/cobbler/item_image.py b/cobbler/item_image.py
index 5a4123b..2deb280 100644
--- a/cobbler/item_image.py
+++ b/cobbler/item_image.py
@@ -49,6 +49,7 @@ class Image(item.Item):
self.file = ''
self.parent = ''
self.depth = 0
+ self.virt_auto_boot = self.settings.virt_auto_boot
self.virt_ram = self.settings.default_virt_ram
self.virt_file_size = self.settings.default_virt_file_size
self.virt_path = ''
@@ -75,6 +76,7 @@ class Image(item.Item):
self.depth = self.load_item(seed_data,'depth',0)
self.owners =
self.load_item(seed_data,'owners',self.settings.default_ownership)
+ self.virt_auto_boot = self.load_item(seed_data,
'virt_auto_boot', self.settings.virt_auto_boot)
self.virt_ram = self.load_item(seed_data, 'virt_ram',
self.settings.default_virt_ram)
self.virt_file_size = self.load_item(seed_data,
'virt_file_size', self.settings.default_virt_file_size)
self.virt_path = self.load_item(seed_data, 'virt_path')
@@ -189,6 +191,9 @@ class Image(item.Item):
raise CX("invalid network count")
return True
+ def set_virt_auto_boot(self,num):
+ return utils.set_virt_auto_boot(self,num)
+
def set_virt_file_size(self,num):
return utils.set_virt_file_size(self,num)
@@ -231,6 +236,7 @@ class Image(item.Item):
'depth' : 0,
'parent' : '',
'owners' : self.owners,
+ 'virt_auto_boot' : self.virt_auto_boot,
'virt_ram' : self.virt_ram,
'virt_path' : self.virt_path,
'virt_type' : self.virt_type,
@@ -263,6 +269,7 @@ class Image(item.Item):
buf = buf + _("virt bridge : %s\n") % self.virt_bridge
buf = buf + _("virt cpus : %s\n") % self.virt_cpus
buf = buf + _("network count : %s\n") % self.network_count
+ buf = buf + _("virt auto boot : %s\n") % self.virt_auto_boot
buf = buf + _("virt file size : %s\n") % self.virt_file_size
buf = buf + _("virt path : %s\n") % self.virt_path
buf = buf + _("virt ram : %s\n") % self.virt_ram
@@ -285,6 +292,8 @@ class Image(item.Item):
'virt_cpus' : self.set_virt_cpus,
'network-count' : self.set_network_count,
'network_count' : self.set_network_count,
+ 'virt-auto-boot' : self.set_virt_auto_boot,
+ 'virt_auto_boot' : self.set_virt_auto_boot,
'virt-file-size' : self.set_virt_file_size,
'virt_file_size' : self.set_virt_file_size,
'virt-bridge' : self.set_virt_bridge,
diff --git a/cobbler/item_profile.py b/cobbler/item_profile.py
index 3f9e946..7016038 100644
--- a/cobbler/item_profile.py
+++ b/cobbler/item_profile.py
@@ -53,6 +53,7 @@ class Profile(item.Item):
self.kernel_options_post =
({}, '<<inherit>>')[is_subobject]
self.ks_meta =
({}, '<<inherit>>')[is_subobject]
self.template_files =
({}, '<<inherit>>')[is_subobject]
+ self.virt_auto_boot =
(self.settings.virt_auto_boot, '<<inherit>>')[is_subobject]
self.virt_cpus =
(1, '<<inherit>>')[is_subobject]
self.virt_file_size =
(self.settings.default_virt_file_size, '<<inherit>>')[is_subobject]
self.virt_ram =
(self.settings.default_virt_ram, '<<inherit>>')[is_subobject]
@@ -117,6 +118,7 @@ class Profile(item.Item):
self.virt_type = self.load_item(seed_data,'virt_type',
self.settings.default_virt_type)
self.virt_bridge = self.load_item(seed_data,'virt_bridge',
self.settings.default_virt_bridge)
self.virt_cpus = self.load_item(seed_data,'virt_cpus',1)
+ self.virt_auto_boot =
self.load_item(seed_data,'virt_auto_boot',self.settings.virt_auto_boot)
# backwards compatibility -- convert string entries to dicts
for storage
if self.kernel_options != "<<inherit>>" and
type(self.kernel_options) != dict:
@@ -234,6 +236,9 @@ class Profile(item.Item):
return True
raise CX(_("kickstart not found: %s") % kickstart)
+ def set_virt_auto_boot(self,num):
+ return utils.set_virt_auto_boot(self,num)
+
def set_virt_cpus(self,num):
return utils.set_virt_cpus(self,num)
@@ -303,6 +308,7 @@ class Profile(item.Item):
'virt_ram' : self.virt_ram,
'virt_bridge' : self.virt_bridge,
'virt_cpus' : self.virt_cpus,
+ 'virt_auto_boot' : self.virt_auto_boot,
'ks_meta' : self.ks_meta,
'template_files' : self.template_files,
'repos' : self.repos,
@@ -351,6 +357,7 @@ class Profile(item.Item):
buf = buf + _("repos : %s\n") % self.repos
buf = buf + _("server : %s\n") % self.server
buf = buf + _("template_files : %s\n") % self.template_files
+ buf = buf + _("virt auto boot : %s\n") % self.virt_auto_boot
buf = buf + _("virt bridge : %s\n") % self.virt_bridge
buf = buf + _("virt cpus : %s\n") % self.virt_cpus
buf = buf + _("virt file size : %s\n") % self.virt_file_size
@@ -372,6 +379,8 @@ class Profile(item.Item):
'kopts' : self.set_kernel_options,
'kopts-post' : self.set_kernel_options_post,
'kopts_post' :
self.set_kernel_options_post,
+ 'virt-auto-boot' : self.set_virt_auto_boot,
+ 'virt_auto_boot' :
self.set_virt_auto_boot,
'virt-file-size' : self.set_virt_file_size,
'virt_file_size' :
self.set_virt_file_size,
'virt-ram' : self.set_virt_ram,
diff --git a/cobbler/item_system.py b/cobbler/item_system.py
index b7e7744..72ca4c0 100644
--- a/cobbler/item_system.py
+++ b/cobbler/item_system.py
@@ -58,6 +58,7 @@ class System(item.Item):
self.virt_cpus = "<<inherit>>" # ""
self.virt_file_size = "<<inherit>>" # ""
self.virt_ram = "<<inherit>>" # ""
+ self.virt_auto_boot = "<<inherit>>" # ""
self.virt_type = "<<inherit>>" # ""
self.virt_path = "<<inherit>>" # ""
self.virt_bridge = "<<inherit>>" # ""
@@ -186,6 +187,7 @@ class System(item.Item):
self.virt_path = self.load_item(seed_data, 'virt_path',
'<<inherit>>')
self.virt_type = self.load_item(seed_data, 'virt_type',
'<<inherit>>')
self.virt_ram =
self.load_item(seed_data,'virt_ram','<<inherit>>')
+ self.virt_auto_boot =
self.load_item(seed_data,'virt_auto_boot','<<inherit>>')
self.virt_file_size =
self.load_item(seed_data,'virt_file_size','<<inherit>>')
self.virt_path =
self.load_item(seed_data,'virt_path','<<inherit>>')
self.virt_type =
self.load_item(seed_data,'virt_type','<<inherit>>')
@@ -534,6 +536,9 @@ class System(item.Item):
def set_virt_file_size(self,num):
return utils.set_virt_file_size(self,num)
+ def set_virt_auto_boot(self,num):
+ return utils.set_virt_auto_boot(self,num)
+
def set_virt_ram(self,num):
return utils.set_virt_ram(self,num)
@@ -662,6 +667,7 @@ class System(item.Item):
'virt_file_size' : self.virt_file_size,
'virt_path' : self.virt_path,
'virt_ram' : self.virt_ram,
+ 'virt_auto_boot' : self.virt_auto_boot,
'virt_type' : self.virt_type,
'mgmt_classes' : self.mgmt_classes,
'template_files' : self.template_files,
@@ -707,6 +713,7 @@ class System(item.Item):
buf = buf + _("virt file size : %s\n") % self.virt_file_size
buf = buf + _("virt path : %s\n") % self.virt_path
buf = buf + _("virt ram : %s\n") % self.virt_ram
+ buf = buf + _("virt auto boot : %s\n") % self.virt_auto_boot
buf = buf + _("virt type : %s\n") % self.virt_type
buf = buf + _("power type : %s\n") % self.power_type
@@ -781,6 +788,8 @@ class System(item.Item):
'delete_interface' : self.delete_interface,
'virt-path' : self.set_virt_path,
'virt_path' : self.set_virt_path,
+ 'virt-auto-boot' : self.set_virt_auto_boot,
+ 'virt_auto_boot' : self.set_virt_auto_boot,
'virt-ram' : self.set_virt_ram,
'virt_ram' : self.set_virt_ram,
'virt-type' : self.set_virt_type,
diff --git a/cobbler/remote.py b/cobbler/remote.py
index eaf3d41..35f7cbb 100644
--- a/cobbler/remote.py
+++ b/cobbler/remote.py
@@ -1979,6 +1979,7 @@ def test_xmlrpc_rw():
server.modify_profile(pid, "kickstart",
"/var/lib/cobbler/kickstarts/sample.ks", token)
server.modify_profile(pid, "kopts", { "level" : "11" }, token)
server.modify_profile(pid, "kopts-post", "noapic", token)
+ server.modify_profile(pid, "virt-auto-boot", 0, token)
server.modify_profile(pid, "virt-file-size", 20, token)
server.modify_profile(pid, "virt-ram", 2048, token)
server.modify_profile(pid, "repos", [], token)
@@ -2050,6 +2051,7 @@ def test_xmlrpc_rw():
server.modify_image(iid, "arch", "x86_64", token)
server.modify_image(iid, "file", "nfs://server/path/to/x.iso", token)
server.modify_image(iid, "owners", [ "alex", "michael" ], token)
+ server.modify_image(iid, "virt-auto-boot", 0, token)
server.modify_image(iid, "virt-cpus", 1, token)
server.modify_image(iid, "virt-file-size", 5, token)
server.modify_image(iid, "virt-bridge", "virbr0", token)
diff --git a/cobbler/settings.py b/cobbler/settings.py
index ce49d9c..576af2c 100644
--- a/cobbler/settings.py
+++ b/cobbler/settings.py
@@ -108,6 +108,7 @@ DEFAULTS = {
"tftpd_bin" : "/usr/sbin/in.tftpd",
"tftpd_conf" : "/etc/xinetd.d/tftp",
"tftpd_rules" : "/etc/tftpd.rules",
+ "virt_auto_boot" : 0,
"vsftpd_bin" : "/usr/sbin/vsftpd",
"webdir" : "/var/www/cobbler",
"xmlrpc_port" : 25151,
diff --git a/cobbler/utils.py b/cobbler/utils.py
index 72b438f..badc524 100644
--- a/cobbler/utils.py
+++ b/cobbler/utils.py
@@ -1177,6 +1177,28 @@ def set_virt_file_size(self,num):
raise CX(_("invalid virt file size"))
return True
+def set_virt_auto_boot(self,num):
+ """
+ For Virt only.
+ Specifies whether the VM should automatically boot upon host reboot
+ 0 tells Koan not to auto_boot virtuals
+ """
+
+ if num == "<<inherit>>":
+ self.virt_auto_boot = "<<inherit>>"
+ return True
+
+ # num is a non-negative integer (0 means default)
+ try:
+ inum = int(num)
+ if (inum == 0) or (inum == 1):
+ self.virt_auto_boot = inum
+ return True
+ return CX(_("invalid virt_auto_boot value: value must be
either '0' (disabled) or '1' (enabled)"))
+ except:
+ return CX(_("invalid virt_auto_boot value: value must be
either '0' (disabled) or '1' (enabled)"))
+ return True
+
def set_virt_ram(self,num):
"""
For Virt only.
diff --git a/contrib/ruby/lib/cobbler/image.rb
b/contrib/ruby/lib/cobbler/image.rb
index ea9dddc..03493c9 100644
--- a/contrib/ruby/lib/cobbler/image.rb
+++ b/contrib/ruby/lib/cobbler/image.rb
@@ -32,7 +32,7 @@ module Cobbler
ATTRIBUTES = [:name, :owners, :depth, :virt_file_size,
:virt_path, :xml_file, :virt_bridge, :file, :parent,
- :image_type, :virt_ram, :virt_cpus, :virt_type, :network_count]
+ :image_type, :virt_ram, :virt_auto_boot, :virt_cpus, :virt_type,
:network_count]
ATTRIBUTES.each do |attr|
cobbler_field attr
diff --git a/contrib/ruby/lib/cobbler/profile.rb
b/contrib/ruby/lib/cobbler/profile.rb
index 9ee27df..438ea26 100644
--- a/contrib/ruby/lib/cobbler/profile.rb
+++ b/contrib/ruby/lib/cobbler/profile.rb
@@ -44,6 +44,7 @@ module Cobbler
cobbler_field :server
cobbler_field :virt_bridge
cobbler_field :virt_ram
+ cobbler_field :virt_auto_boot
cobbler_field :kernel_options
cobbler_field :virt_cpus
cobbler_field :ks_meta
diff --git a/contrib/ruby/lib/cobbler/system.rb
b/contrib/ruby/lib/cobbler/system.rb
index 5751ede..b6d6cea 100644
--- a/contrib/ruby/lib/cobbler/system.rb
+++ b/contrib/ruby/lib/cobbler/system.rb
@@ -46,6 +46,7 @@ module Cobbler
cobbler_field :virt_file_size
cobbler_field :virt_path
cobbler_field :virt_ram
+ cobbler_field :virt_auto_boot
cobbler_field :virt_type
cobbler_field :virt_bridge
diff --git a/contrib/ruby/test/test_image.rb
b/contrib/ruby/test/test_image.rb
index a29218f..53ff95c 100644
--- a/contrib/ruby/test/test_image.rb
+++ b/contrib/ruby/test/test_image.rb
@@ -47,6 +47,7 @@ module Cobbler
'virt_path' => '<<inherit>>',
'virt_bridge' => '<<inherit>>',
'virt_ram' => '<<inherit>>',
+ 'virt_auto_boot' => '<<inherit>>',
'virt_cpus' => '<<inherit>>',
'file' => '/var/ftp/pub/Fedora-9-i686-Live-KDE.iso',
'parent' => nil,
@@ -60,6 +61,7 @@ module Cobbler
'virt_path' => '<<inherit>>',
'virt_bridge' => '<<inherit>>',
'virt_ram' => '<<inherit>>',
+ 'virt_auto_boot' => '<<inherit>>',
'virt_cpus' => '<<inherit>>',
'file' => '/var/ftp/pub/Fedora-9-i686-Live.iso',
'parent' => nil,
diff --git a/contrib/ruby/test/test_profile.rb
b/contrib/ruby/test/test_profile.rb
index 237f47b..76251a9 100644
--- a/contrib/ruby/test/test_profile.rb
+++ b/contrib/ruby/test/test_profile.rb
@@ -44,6 +44,7 @@ module Cobbler
'owners' => ['admin'],
'repos' => [],
'server' => '<<inherit>>',
+ 'virt auto boot' => 0,
'virt bridge' => 'xenbr0',
'virt cpus' => '1',
'virt file size' => '5',
@@ -62,6 +63,7 @@ module Cobbler
'owners' => ['admin'],
'repos' => [],
'server' => '<<inherit>>',
+ 'virt auto boot' => 0,
'virt bridge' => 'xenbr0',
'virt cpus' => '1',
'virt file size' => '5',
diff --git a/contrib/ruby/test/test_system.rb
b/contrib/ruby/test/test_system.rb
index 727ea7e..db13bc3 100644
--- a/contrib/ruby/test/test_system.rb
+++ b/contrib/ruby/test/test_system.rb
@@ -67,6 +67,7 @@ module Cobbler
},
'virt_bridge' => '<<inherit>>',
'virt_ram' => '<<inherit>>',
+ 'virt_auto_boot' => '<<inherit>>',
'ks_meta' => nil,
'netboot_enabled' => 'True',
'kernel_options' => nil,
@@ -89,6 +90,7 @@ module Cobbler
'mac_address' => 'AA:BB:CC:DD:EE:FF'}},
'virt_bridge' => '<<inherit>>',
'virt_ram' => '<<inherit>>',
+ 'virt_auto_boot' => '<<inherit>>',
'ks_meta' => nil,
'netboot_enabled' => 'True',
'kernel_options' => nil,
diff --git a/installer_templates/settings.template
b/installer_templates/settings.template
index 51457a6..81ccdb4 100644
--- a/installer_templates/settings.template
+++ b/installer_templates/settings.template
@@ -346,6 +346,11 @@ anamon_enabled: 0
tftpd_bin: /usr/sbin/in.tftpd
tftpd_conf: /etc/xinetd.d/tftp
+# by default, profiles/systems will not be set to 'auto-boot' virtual
systems;
+# i.e. if a physical system reboots, the virtual systems hosted on that
+# physical system will NOT be booted automatically.
+virt_auto_boot: 0
+
# cobbler's web directory. Don't change this setting -- see the
# Wiki on "relocating your cobbler install" if your /var partition
# is not large enough.
diff --git a/webui_templates/image_edit.tmpl
b/webui_templates/image_edit.tmpl
index 8c369db..83a2c21 100644
--- a/webui_templates/image_edit.tmpl
+++ b/webui_templates/image_edit.tmpl
@@ -196,6 +196,21 @@ function disablename(value)
</td>
</tr>
+ ## self.virt_auto_boot = self.settings.virt_auto_boot
+
+ <tr>
+ <td>
+ <label for="virtautoboot">Virt AutoBoot</label>
+ </td>
+ <td>
+ <input type="text" size="5" style="width: 150px;"
name="virtautoboot" id="virtautoboot"
+ #if $image
+ value="$image.virt_auto_boot"
+ #end if
+ />
+ <p class="context-tip">For virtual installs only, enable/disable VM
autoboot.</p>
+ </td>
+ </tr>
## self.virt_file_size = self.settings.default_virt_file_size
<tr>
diff --git a/webui_templates/profile_edit.tmpl
b/webui_templates/profile_edit.tmpl
index 1091de5..4cbc20a 100644
--- a/webui_templates/profile_edit.tmpl
+++ b/webui_templates/profile_edit.tmpl
@@ -299,6 +299,19 @@ function disablename(value)
<tr>
<td class="virtedit">
+ <label for="virtautoboot">Virt AutoBoot</label>
+ </td>
+ <td class="virtedit">
+ <input type="text" size="5" style="width: 150px;"
name="virtautoboot" id="virtautoboot"
+ #if $profile
+ value="$profile.virt_auto_boot"
+ #end if
+ />
+ <p class="context-tip">For virtual installs only, enable/disable VM
autoboot.</p>
+ </td>
+ </tr>
+ <tr>
+ <td class="virtedit">
<label for="virttype">Virt Type</label>
</td>
<td class="virtedit">
diff --git a/webui_templates/search.tmpl b/webui_templates/search.tmpl
index 44f1eb5..3f0adf0 100644
--- a/webui_templates/search.tmpl
+++ b/webui_templates/search.tmpl
@@ -58,6 +58,7 @@
<option value="redhat_management_server">red hat management
server</option>
<option value="repos">repos</option>
<option value="template_files">template files</option>
+ <option value="virt_auto_boot">virt autoboot</option>
<option value="virt_bridge">virt bridge</option>
<option value="virt_cpus">virt cpus</option>
<option value="virt_file_size">virt file size (GB)</option>
@@ -104,6 +105,7 @@
<option value="static">static</option>
<option value="static_routes">static_routes</option>
<option value="template_files">template files</option>
+ <option value="virt_auto_boot">virt autoboot</option>
<option value="virt_bridge">virt bridge</option>
<option value="virt_cpus">virt cpus</option>
<option value="virt_file_size">virt file size (GB)</option>
@@ -135,6 +137,7 @@
<option value="network_count">network count</option>
<option value="os_version">os version</option>
<option value="owners">owners</option>
+ <option value="virt_auto_boot">virt autoboot</option>
<option value="virt_ram">virt ram (MB)</option>
<option value="virt_path">virt path</option>
<option value="virt_type">virt type</option>
diff --git a/webui_templates/system_edit.tmpl
b/webui_templates/system_edit.tmpl
index cf04725..b1d6335 100644
--- a/webui_templates/system_edit.tmpl
+++ b/webui_templates/system_edit.tmpl
@@ -646,6 +646,18 @@ redhatmanagementserver"
<tr>
<td class="virtedit">
+ <label for="virtautoboot">Virt AutoBoot</label>
+ </td>
+ <td class="virtedit">
+ <input type="text" size="5" style="width: 150px;"
name="virtautoboot" id="virtautoboot"
+ #if $system
+ value="$system.virt_auto_boot"
+ #end if
+ />
+ <p class="context-tip">For virtual installs only, enable/disable VM
autoboot.</p>
+ </td>
+ <tr>
+ <td class="virtedit">
<label for="virttype">Virt Type</label>
</td>
<td class="virtedit">
--
1.5.5.1
15 years, 1 month
Re: Branches
by Michael DeHaan
Michael DeHaan wrote:
> Hi folks,
>
> Thanks for all the great patches lately.
>
> If you send an email with a patch that is already on a remote branch
> (fedorapeople or github, etc), please let me know which branch it is on
> so I know which branch to merge.
>
> Also, if you have a fix for master (1.6.0) also merge it to your devel
> branch, it saves a "git cherry-pick" on my end and makes sure we don't
> miss anything accidentally.
>
> Thanks!
>
> --Michael
> _______________________________________________
> cobbler mailing list
> cobbler(a)lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/cobbler
>
This should have gone to the devel list :)
15 years, 1 month
Solaris work restarted
by James Cammarata
http://cobbler.pastebin.com/f1fddf930
I'm having trouble getting a VM to PXE using this setup (could have sworn
it worked in the past), but I'm importing Solaris 10 x86 again. Nothing
pushed up to github since it's very raw and doesn't work at all, but just
thought I'd share progress :)
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
15 years, 1 month
[PATCH]es for devel and ris-devel
by James Cammarata
All on my github:
commit ea11bf8d26dbb9b68e0ee6e19997c80eeb6d2f4f
Author: James Cammarata <jimi(a)sngx.net>
Date: Sat Mar 21 16:45:45 2009 -0500
Changes to action_litesync.py to cleanup windows systems/profiles
directories in the tftp root directory
commit df6d992f415998112d7f40fd0778400760edcf48
Author: James Cammarata <jimi(a)sngx.net>
Date: Sat Mar 21 16:33:02 2009 -0500
Modifications to action_litesync.py to create PXE entries for windows
profiles/systems
commit 6b6b6531fca199fbcadba43d8ff08c0df08d3ee0
Author: James Cammarata <jimi(a)sngx.net>
Date: Sat Mar 21 10:32:09 2009 -0500
Modification to remove_single_distro to only try to unmount the bind
mount if the distro is windows based
commit 79c0ac9efe2f998dc7b8ce1d2f7df5773bf2bab0
Author: James Cammarata <jimi(a)sngx.net>
Date: Sat Mar 21 10:31:34 2009 -0500
Fix to correct a stack dump error caused by line 699, as distro may be
None
commit 092deb457c9fb9c16ede419a0b43d2a9a7e8a26f
Author: James Cammarata <jimi(a)sngx.net>
Date: Sat Mar 21 09:31:05 2009 -0500
Made changes to setup.py and spec file, missing windows sif templates
The stack dump patch is on both the "my-devel" and the "ris-devel"
branches. This was a small error in pxegen.py, caused by the fact that
distro in that function can be None, causing a stack dump.
For anyone testing windows stuff out, these patches remove the need to do a
"cobbler sync" anytime something changes. There is a known issue with the
random id used for the tftp rewrite rules is saved as an empty string when
the profile/system is first created, editing the profile after this saves
the id correctly. I'm working on why that happens now...
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
15 years, 1 month
[PATCH] correct potential use of None object in item_system.py
by James Cammarata
Ran sync and hit this traceback:
# cobbler sync
Extracting cabinet:
/var/www/cobbler/ks_mirror/windows2k3-i386/i386/startrom.n1_
extracting /tftpboot/profiles/windows2k3-i386/startrom.n12
All done, no errors.
Extracting cabinet:
/var/www/cobbler/ks_mirror/windows2k3-i386/i386/setupldr.ex_
extracting /tftpboot/profiles/windows2k3-i386/setupldr.exe
All done, no errors.
'NoneType' object has no attribute 'get_assigned_address'
File "/usr/lib/python2.4/site-packages/cobbler/cobbler.py", line 83, in
main
rc = BootCLI().run(sys.argv)
File "/usr/lib/python2.4/site-packages/cobbler/cobbler.py", line 61, in
run
return self.loader.run(args)
File "/usr/lib/python2.4/site-packages/cobbler/commands.py", line 122, in
run
return fn.run()
File "/usr/lib/python2.4/site-packages/cobbler/modules/cli_misc.py", line
201, in run
return self.api.sync(verbose=self.options.verbose)
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 588, in sync
return sync.run()
File "/usr/lib/python2.4/site-packages/cobbler/action_sync.py", line 123,
in run
self.pxegen.write_all_system_files(x)
File "/usr/lib/python2.4/site-packages/cobbler/pxegen.py", line 371, in
write_all_system_files
f1 = utils.get_config_filename(system,interface=name)
File "/usr/lib/python2.4/site-packages/cobbler/utils.py", line 206, in
get_config_filename
ip = sys.get_ip_address(interface)
File "/usr/lib/python2.4/site-packages/cobbler/item_system.py", line 384,
in get_ip_address
return net.get_assigned_address(self.name, interface)
This is from the devel branch only.
It looks like the net object returned by the search is not checked to make
sure it is valid, the patch below does this:
diff --git a/cobbler/item_system.py b/cobbler/item_system.py
index 4a056a9..dbc0cac 100644
--- a/cobbler/item_system.py
+++ b/cobbler/item_system.py
@@ -381,7 +381,10 @@ class System(item.Item):
return intf["ip_address"].strip()
elif intf["subnet"] != "":
net = self.config.networks().find(name=intf["subnet"])
- return net.get_assigned_address(self.name, interface)
+ if net:
+ return net.get_assigned_address(self.name, interface)
+ else:
+ return ""
else:
return ""
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
15 years, 1 month
[PATCH] Ubuntu support
by Jasper Capel
Hi all,
Patches on my git branches capel-master and capel-devel implement Ubuntu
support:
- Imports now fully working (imports the network-aware image now)
- Pass correct kernel options to the ubuntu installer
- Updated preseed to allow for out-of-the-box installation w/o human
intervention
Tested with HardyHeron and IntrepidIbex i386 arch w/PXE boot, more
testing is of course welcome.
I don't think virtualized installations will work yet.
git://bender.newnewyork.nl/cobbler
http://bender.newnewyork.nl/git/gitweb.cgi?p=cobbler/.git;a=summary
Cheers,
Jasper
15 years, 1 month
Fun with blame data
by James Cammarata
While I was looking up that bug this morning, I used git blame for the
first time. It made me realize, I could get a quick estimate of the total
lines contributed per person, so I wrote up a quick and dirty script to do
so. Here are the results, for those who are interested :)
$ cat blame-data | sort -n
3 Bill Peck
4 Bryan Kearney
6 Jeffrey C. Ollie
12 Brenton Leanhardt
27 Dave Hatton
33 mdehaan(a)localhost.localdomain
39 David Lutterkort
45 Brad Hinson
49 Javier Palacios
49 Mihai Ibanescu
105 mdehaan(a)mdehaan.rdu.redhat.com
407 Rob Lazzurs
437 Jasper Capel
664 James Cammarata
774 John Eckersberg
1317 root
2985 Darryl L. Pierce
4450 James Laska
26752 Not Committed Yet
122264 Michael DeHaan
The ""Not Committed Yet" entries are a little weird, not sure where they
came from, possibly files that are git-ignored (my script below does not
discriminate). Please note, there is no discrimination as to what the line
contents are, they could be blank lines (and quite a few are). Also note,
this was run on my devel branch, so you'll most likely get different
results if you try this at home.
Here's the command I ran to compile the data:
$ find /data/devel/cobbler -type f -exec git blame -c -t {} \; | cut -f 2 |
tr -d '(' | sort | uniq -c > blame-data
Enjoy!
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
15 years, 1 month
[PATCH] Watch for new installer files used in F11
by James Laska
---
aux/anamon | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/aux/anamon b/aux/anamon
index fe4d0eb..481b2ee 100644
--- a/aux/anamon
+++ b/aux/anamon
@@ -163,6 +163,9 @@ def anamon_loop():
slog = WatchedFile("/tmp/syslog", "sys.log")
llog = WatchedFile("/tmp/lvmout", "lvmout.log")
+ storage_log = WatchedFile("/tmp/storage.log", "storage.log")
+ prgm_log = WatchedFile("/tmp/program.log", "program.log")
+ vnc_log = WatchedFile("/tmp/vncserver.log", "vncserver.log")
kcfg = WatchedFile("/tmp/ks.cfg", "ks.cfg")
scrlog = WatchedFile("/tmp/ks-script.log", "ks-script.log")
dump = WatchedFile("/tmp/anacdump.txt", "anacdump.txt")
@@ -187,7 +190,7 @@ def anamon_loop():
# Use the default watchlist and waitlist
else:
- watchlist = [alog, slog, dump, scrlog, mod, llog, kcfg]
+ watchlist = [alog, slog, dump, scrlog, mod, llog, kcfg, storage_log, prgm_log, vnc_log]
waitlist = [ilog, ilog2, ulog, ulog2]
# Monitor loop
--
1.6.0.6
15 years, 1 month
[PATCH 2/2] Ensure the %preun section exits cleanly
by Todd Zullinger
---
Patch is also attached for use with git am. :)
cobbler.spec | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cobbler.spec b/cobbler.spec
index 57ea7e5..e1a15b1 100644
--- a/cobbler.spec
+++ b/cobbler.spec
@@ -118,7 +118,7 @@ done
%preun
if [ $1 = 0 ]; then
/sbin/service cobblerd stop >/dev/null 2>&1 || :
- chkconfig --del cobblerd
+ chkconfig --del cobblerd || :
fi
%postun
--
1.6.2
15 years, 1 month