Re: [foreman-users] Errata and Content View issue

2017-12-09 Thread Andrew Schofield
You are encountering this 
bug: https://bugzilla.redhat.com/show_bug.cgi?id=1488167 looks like this 
fix is in pulp-2.14


On Saturday, December 9, 2017 at 3:51:08 AM UTC-5, Arsène Gschwind wrote:
>
>
>
> On Saturday, December 9, 2017 at 2:40:04 AM UTC+1, Lachlan Musicman wrote:
>>
>> On 9 December 2017 at 07:38, Arsène Gschwind  
>> wrote:
>>
>>> Hi,
>>>
>>> I'm running Foreman 1.15.6 and Katello 3.4.
>>> I did apply an Errata to a host what did generate a new Content View 
>>> version, so far s good. The new Content View includes the Errata but not 
>>> the package for the this Errata.
>>>
>>>
>>> 
>>> As you may see on the picture in version 1.1 there is one more Errata 
>>> but the amount of packages didn't change.
>>> When doing a yum check-update on host i don't see any new package.
>>>
>>> After generating a full new version version of the content view i will 
>>> get those updates on the host.
>>> This sounds like a bug
>>>
>>> Thanks for any hint to help debug that issue.
>>>
>>>
>> I also saw this with these versions. If you look at the release notes for 
>> Foreman 1.16 and Katello 3.5 there are a number of bugs related that will 
>> hopefully fix this issue.
>>
>> The upgrade is a relatively simple process - I'd recommend it.
>>
>> Cheers
>> L.
>>
>
> I've tried the update to TFM 1.16 and Katello 3.5 but I had to revert back 
> since the provisioning didn't work at all.
> I may give another attempt
>
> Tanks.
> Cheers,
> Arsène 
>
>>  
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-users+unsubscr...@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


[foreman-users] Re: user-data script syntax error in line 86 when script has 75 lines

2017-12-09 Thread Christian Setzer
same error today. yesterday everything was fine and working. i could deploy 
an image for the first time with userdata plugin. today

*Unable to save *
- Render user data template for alton-tibbals.1000.local task failed with 
the following error: ERF22-1307 [Foreman::Renderer::SyntaxError]: Syntax 
error occurred while parsing the template Unnamed, make sure you have all 
ERB tags properly closed and the Ruby syntax is valid. The Ruby error: 
(string):86 :: parse error on value "<" (tLT)
nothing has changed in the code...

and here are the scripts: not that it matters what in them because i could 
write something something in it and it would throw that error again.

since i dont want to go back on my backups and redo everything .. a 
solution would be prefered as you can understand.


<%#
kind: user_data
name: 1_user
oses:
- CentOS 6
- CentOS 7
- Fedora 19
- Fedora 20
- Fedora 21
- Fedora 22
- Fedora 23
-%>
#cloud-config
hostname: <%= @host.shortname %>
fqdn: <%= @host %>
manage_etc_hosts: true
 
groups:
 - admin
 
users:
 - default
 - name: admin
   primary-group: admin
   groups: users
   shell: /bin/bash
   sudo: ['ALL=(ALL) ALL']
   lock-passwd: false
   passwd: <%= @host.root_pass %>
 
identity:
  LinuxPrep:
domain: <%= @host.domain %>
hostName: <%= @host.shortname%>
hwClockUTC: true
timeZone: <%= @host.params['time-zone'] || 'UTC' %>
 
globalIPSettings:
  dnsSuffixList: [<%= @host.domain %>]
 
<% interface = @host.interfaces.first %>
nicSettingMap:
  - adapter:
  dnsDomain: <%= interface.domain %>
  dnsServerList: [<%= interface.subnet.dns_primary %>, <%= 
interface.subnet.dns_secondary %>]
  gateway: [<%= interface.subnet.gateway %>]
  ip: <%= interface.ip %>
  subnetMask: <%= interface.subnet.mask %>

write_files:
 - path: /tmp/foreman-userdata.sh
   permissions: '0755'
   content: |
   #!/bin/bash
   yum -t -y -e 0 update
<%= indent(7) { snippet('1_subscription_manager_registration') } %>
<%= indent(7) { snippet('1_puppet_setup') } %>

runcmd:
 - [ cloud-init-per, once, foreman-userdata, /tmp/foreman-userdata.sh ]

phone_home:
  url: <%= foreman_url('built') %>
  post: []
  tries: 10


-

/usr/bin/yum -t -y -e 0 install subscription-manager
/usr/bin/rpm -ivh <%= subscription_manager_configuration_url(@host) %>
/usr/bin/echo "Registering the System"
/usr/sbin/subscription-manager register --org="<%= 
@host.rhsm_organization_label %>" --name="<%= @host.name %>" 
--activationkey="<%= @host.params['kt_activation_keys'] %>"
/usr/bin/yum -t -y -e 0 install katello-agent
/usr/sbin/chkconfig goferd on


-

<%#
kind: snippet
name: 1_puppet_setup
description: this snippet will configure the Puppet agent
%>
<%
os_family = @host.operatingsystem.family
os_major  = @host.operatingsystem.major.to_i
os_name   = @host.operatingsystem.name

linux_package = 'puppet-agent'
etc_path = '/etc/puppetlabs/puppet'
bin_path = '/opt/puppetlabs/puppet/bin'
%>

/usr/bin/yum -t -y install <%= linux_package %>

cat > <%= etc_path %>/puppet.conf << EOF
<%= snippet 'puppet.conf' %>
EOF

puppet_unit=puppet
/usr/bin/systemctl enable ${puppet_unit}
/sbin/chkconfig --level 345 puppet on
<%= bin_path %>/puppet resource service puppet enable=true
<%= bin_path %>/puppet resource service puppet ensure=running



<%#
kind: snippet
name: 1_puppet.conf
%>
<%
  os_family = @host.operatingsystem.family
  os_name   = @host.operatingsystem.name

  var_dir = '/opt/puppetlabs/puppet/cache'
  log_dir = '/var/log/puppetlabs/puppet'
  run_dir = '/var/run/puppetlabs'
  ssl_dir = '/etc/puppetlabs/puppet/ssl'
%>
[main]
<%- unless @host.params['dns_alt_names'].to_s.empty? -%>
dns_alt_names = <%= @host.params['dns_alt_names'] %>
<%- end -%>
vardir = <%= var_dir %>
logdir = <%= log_dir %>
rundir = <%= run_dir %>
ssldir = <%= ssl_dir %>

[agent]
pluginsync  = true
report  = true
ignoreschedules = true
ca_server   = <%= @host.puppet_ca_server %>
certname= <%= @host.certname %>
environment = <%= @host.environment %>
server  = <%= @host.puppetmaster %>




-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-users+unsubscr...@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


Re: [foreman-users] Errata and Content View issue

2017-12-09 Thread Arsène Gschwind


On Saturday, December 9, 2017 at 2:40:04 AM UTC+1, Lachlan Musicman wrote:
>
> On 9 December 2017 at 07:38, Arsène Gschwind  > wrote:
>
>> Hi,
>>
>> I'm running Foreman 1.15.6 and Katello 3.4.
>> I did apply an Errata to a host what did generate a new Content View 
>> version, so far s good. The new Content View includes the Errata but not 
>> the package for the this Errata.
>>
>>
>> 
>> As you may see on the picture in version 1.1 there is one more Errata but 
>> the amount of packages didn't change.
>> When doing a yum check-update on host i don't see any new package.
>>
>> After generating a full new version version of the content view i will 
>> get those updates on the host.
>> This sounds like a bug
>>
>> Thanks for any hint to help debug that issue.
>>
>>
> I also saw this with these versions. If you look at the release notes for 
> Foreman 1.16 and Katello 3.5 there are a number of bugs related that will 
> hopefully fix this issue.
>
> The upgrade is a relatively simple process - I'd recommend it.
>
> Cheers
> L.
>

I've tried the update to TFM 1.16 and Katello 3.5 but I had to revert back 
since the provisioning didn't work at all.
I may give another attempt

Tanks.
Cheers,
Arsène 

>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-users+unsubscr...@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.