Fix razor ipxe template. #63

Merged
merged 3 commits into from Oct 11, 2012

Conversation

Projects
None yet
2 participants
@nanliu
Contributor

nanliu commented Aug 22, 2012

Update ipxe template to match recent changes to razor.

@three18ti

This comment has been minimized.

Show comment
Hide comment
@three18ti

three18ti Aug 24, 2012

Would it be possible to use razor to generate the ipxe confg file? I used the following to generate my ipxe file:

razor ipxe config > /var/lib/tftpboot/razor.ipxe

(annoyingly, the next puppet run, puppet overwrote my razor.ipxe file, so I ran:

roazor ipxe config > /etc/puppet/modules/razor/templates/razor.ipxe.erb

and ran puppet again)

this would eliminate the need to update the template every new razor revision.

Thoughts, Comments, insults?

Would it be possible to use razor to generate the ipxe confg file? I used the following to generate my ipxe file:

razor ipxe config > /var/lib/tftpboot/razor.ipxe

(annoyingly, the next puppet run, puppet overwrote my razor.ipxe file, so I ran:

roazor ipxe config > /etc/puppet/modules/razor/templates/razor.ipxe.erb

and ran puppet again)

this would eliminate the need to update the template every new razor revision.

Thoughts, Comments, insults?

@nanliu

This comment has been minimized.

Show comment
Hide comment
@nanliu

nanliu Aug 24, 2012

Contributor

I will accept a pull request that supports configuration of listening ip address in ipxe and razor config without using templates if it can be done cleanly.

The solution suggested only sort of works if you don't use a puppet master, and the generated config file is not an erb template.

The reason this is currently an erb template is because we need to change the ipaddress for multi-nic systems. The razor ipxe config output is not always correct in those cases.

chain http://<%= address %>

This also needs to be fixed in the razor config file, and deployed conditionally so it's not always triggering a razor service restart on every puppet run.

There was an attempt to support this via execs, but it got rather messy:

exec { "gen_ipxe":
  command => "${directory}/bin/razor config ipxe > ???" # the location is different for different platforms.
  refreshonly => true,
  subscribe => ...,
}

exec { "fix_ipxe":
  command => ..., # sed clean up of ipxe config.
  refreshonly => true,
  subscribe => Exec['gen_ipxe'],
}

exec { "gen_config":
  command => ...,
  refreshonly => true,
  subscribe => ...,
}

exec { "fix_config":
  command => ...,
  refreshonly => true,
  subscribe => Exec['gen_config'],
}
Contributor

nanliu commented Aug 24, 2012

I will accept a pull request that supports configuration of listening ip address in ipxe and razor config without using templates if it can be done cleanly.

The solution suggested only sort of works if you don't use a puppet master, and the generated config file is not an erb template.

The reason this is currently an erb template is because we need to change the ipaddress for multi-nic systems. The razor ipxe config output is not always correct in those cases.

chain http://<%= address %>

This also needs to be fixed in the razor config file, and deployed conditionally so it's not always triggering a razor service restart on every puppet run.

There was an attempt to support this via execs, but it got rather messy:

exec { "gen_ipxe":
  command => "${directory}/bin/razor config ipxe > ???" # the location is different for different platforms.
  refreshonly => true,
  subscribe => ...,
}

exec { "fix_ipxe":
  command => ..., # sed clean up of ipxe config.
  refreshonly => true,
  subscribe => Exec['gen_ipxe'],
}

exec { "gen_config":
  command => ...,
  refreshonly => true,
  subscribe => ...,
}

exec { "fix_config":
  command => ...,
  refreshonly => true,
  subscribe => Exec['gen_config'],
}
@three18ti

This comment has been minimized.

Show comment
Hide comment
@three18ti

three18ti Aug 24, 2012

I see. Thank you for the clarification.
On Aug 24, 2012 10:53 AM, "Nan Liu" notifications@github.com wrote:

I will accept a pull request that supports configuration of listening ip
address in ipxe and razor config without using templates if it can be done
cleanly.

The solution suggested only sort of works if you don't use a puppet
master, and the generated config file is not an erb template.

The reason this is currently an erb template is because we need to change
the ipaddress for multi-nic systems. The razor ipxe config output is not
always correct in those cases.

chain http://<%= address %>

This also needs to be fixed in the razor config file, and deployed
conditionally so it's not always triggering a razor service restart on
every puppet run.

There was an attempt still support this via execs, but it got rather messy:

exec { "gen_ipxe":
command => "${directory}/bin/razor config ipxe > ???" # the location is different for different platforms.
refreshonly => true,
subscribe => ...,
}

exec { "fix_ipxe":
command => ..., # sed clean up of ipxe config.
refreshonly => true,
subscribe => Exec['gen_ipxe'],
}

exec { "gen_config":
command => ...,
refreshonly => true,
subscribe => ...,
}

exec { "fix_config":
command => ...,
refreshonly => true,
subscribe => Exec['gen_config'],
}


Reply to this email directly or view it on GitHubhttps://github.com/puppetlabs/puppetlabs-razor/pull/63#issuecomment-8008163.

I see. Thank you for the clarification.
On Aug 24, 2012 10:53 AM, "Nan Liu" notifications@github.com wrote:

I will accept a pull request that supports configuration of listening ip
address in ipxe and razor config without using templates if it can be done
cleanly.

The solution suggested only sort of works if you don't use a puppet
master, and the generated config file is not an erb template.

The reason this is currently an erb template is because we need to change
the ipaddress for multi-nic systems. The razor ipxe config output is not
always correct in those cases.

chain http://<%= address %>

This also needs to be fixed in the razor config file, and deployed
conditionally so it's not always triggering a razor service restart on
every puppet run.

There was an attempt still support this via execs, but it got rather messy:

exec { "gen_ipxe":
command => "${directory}/bin/razor config ipxe > ???" # the location is different for different platforms.
refreshonly => true,
subscribe => ...,
}

exec { "fix_ipxe":
command => ..., # sed clean up of ipxe config.
refreshonly => true,
subscribe => Exec['gen_ipxe'],
}

exec { "gen_config":
command => ...,
refreshonly => true,
subscribe => ...,
}

exec { "fix_config":
command => ...,
refreshonly => true,
subscribe => Exec['gen_config'],
}


Reply to this email directly or view it on GitHubhttps://github.com/puppetlabs/puppetlabs-razor/pull/63#issuecomment-8008163.

nanliu added a commit that referenced this pull request Oct 11, 2012

@nanliu nanliu merged commit d3d51fe into puppetlabs:master Oct 11, 2012

@nanliu nanliu referenced this pull request in puppetlabs/Razor Oct 11, 2012

Closed

RHEL Kickstart hangs with multiple NICs #218

@nanliu nanliu deleted the nanliu:tb/ipxe branch Apr 7, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment