Re: [foreman-users] provisioning interface is private - how to assign a routed IP?

2017-12-18 Thread Lukas Zapletal
You mirror does not need to be on the Foreman instance, just somewhere
on the provisioning network or nearby (routed).

You can try to configure 2nd interface via Anaconda options, this is
possible. Note CentOS 6 and 7 PXELinux syntax differs a lot, take care
and use documentation.

Good luck!

On Mon, Dec 18, 2017 at 10:49 AM,  <rai...@ultra-secure.de> wrote:
> Am 2017-12-18 10:21, schrieb Lukas Zapletal:
>>
>> Hello,
>>
>> you are doing it right. And yes, the general advice is to setup mirror
>> (Katello/Pulp backend can help you with that a lot if you use RPMs and
>> there's plugin for SUSE), or you can mirror manually.
>>
>> Now, Foreman is able to configure two or more ifaces, you pick one as
>> primary which holds the default route, then you pick one as
>> provisioning and that's the one you will be booting from (PXE/DHCP).
>>
>> Now, the problem is how installer behaves in this setup - this might
>> be different for Red Hats, Debians and SUSE, I have experience with
>> Red Hat and in that case the 1st (primary) interface is not used until
>> you do firstboot, thus you need to route IP packets to your
>> installation source or have mirror, because our PXELinux templates
>> allows you to configure only one interface. But Anaconda supports
>> more, you need to tune our templates and provide all interfaces via
>> kernel command line. This will be similar in other OSes.
>>
>> If you test this setup, please file a patch to our community-templates
>> so others can use it. But it's pretty non-standard setup, as I
>> explained above. Your provisioning network should be capable of doing
>> things from start to the finish.
>
>
>
> OK, I'll see what I can do.
>
> I use CentOS and I really wanted to avoid having to setup a local mirror for
> it - my setup lives on my (somewhat nimble) local SSD...
>
>
>
> Thanks.
>
>
> Rainer
>
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] provisioning interface is private - how to assign a routed IP?

2017-12-18 Thread Lukas Zapletal
Hello,

you are doing it right. And yes, the general advice is to setup mirror
(Katello/Pulp backend can help you with that a lot if you use RPMs and
there's plugin for SUSE), or you can mirror manually.

Now, Foreman is able to configure two or more ifaces, you pick one as
primary which holds the default route, then you pick one as
provisioning and that's the one you will be booting from (PXE/DHCP).

Now, the problem is how installer behaves in this setup - this might
be different for Red Hats, Debians and SUSE, I have experience with
Red Hat and in that case the 1st (primary) interface is not used until
you do firstboot, thus you need to route IP packets to your
installation source or have mirror, because our PXELinux templates
allows you to configure only one interface. But Anaconda supports
more, you need to tune our templates and provide all interfaces via
kernel command line. This will be similar in other OSes.

If you test this setup, please file a patch to our community-templates
so others can use it. But it's pretty non-standard setup, as I
explained above. Your provisioning network should be capable of doing
things from start to the finish.

LZ

On Mon, Dec 18, 2017 at 12:44 AM,   wrote:
> Hi,
>
> I'm trying to setup the foreman on my home network, with VMWare Fusion Pro.
>
>
> I've created an additional private network in Fusion that doesn't use DHCP.
>
> I've created a VM with the first interface being in my LAN and the 2nd
> interface being in the provisioning net.
> The VM PXE-boots from the foreman-server (really the smart-proxy, I imagine,
> but it's on the same host).
>
>
> However, because it's private it can't download the installer-image etc.pp.
>
>
> I setup a 2nd network (the LAN my router hands out), but I'm not sure how to
> tell the foreman that the DHCP of my router should assign IPs and it
> shouldn't do anything.
> I also failed to set IPs manually.
>
> In a real-world scenario, one would probably have a mirror reachable from
> the provisioning network, but I'm just getting started.
>
>
> The documentation is a bit sparse on this kind of setup - though I imagine
> it's not too uncommon.
>
>
> How would I configure this setup (1st interface=DHCP from router, 2nd
> interface=DHCP from foreman/smart-proxy)?
>
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Can Foreman support Deploying Windows images into Bare Metal?

2017-12-11 Thread Lukas Zapletal
We have several users doing that, check demos from this year, we had
one or two demos around this topic.

LZ

On Mon, Dec 11, 2017 at 8:04 AM, shrek maxi  wrote:
> If it does. How?
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Foreman Internal DB assigned ip space issue

2017-12-08 Thread Lukas Zapletal
Hello,

there is no contract that you are getting same numbers for IPv4 and 6.
This is not a bug, feel free to send RFE or patch to do this.

We have new Random IPAM generator that returns pseudo random IPs
seeded by MAC address of the device. Basically it will always return
you same IP address for same physical NIC. This will not work for VMs
tho.

LZ

On Thu, Dec 7, 2017 at 6:49 PM, Mike Wilson  wrote:
> I've noticed a bug in foreman when assigning IP space using the "Internal
> DB". We currently want both ipv4 and ipv6 space to match when assigned.
> Something like this.
>
> 10.0.0.230
> :XXX:XXX:5::0:230
>
> If you set the range of ipv4 space to 10.0.0.230 to 10.0.0.250 and
> :XXX:XXX:5::0:230 to :XXX:XXX:5::0:250 when you build a VM you'll
> get these 2 assigned if building a VM.
>
> 10.0.0.230
> :XXX:XXX:5::0:231
>
> (v4 is .230, v6 is :231)
>
> Now, if you build baremetal it works (10.0.0.230 :XXX:XXX:5::0:230).
>
> Since we're not building a lot of baremetal machines I set the ipv4 value to
> 10.0.0.231 to 10.0.0.250 and it allows us to work around it (it assigns in
> proper sequence). HOWEVER this breaks baremetal and you have to manually
> correct it. Same for "clone" versions of host creations.
>
> This seems to be an issue with 1.15 and 1.16 (probably earlier also).
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Foreman / Katello and Redhat Licensing

2017-12-05 Thread Lukas Zapletal
It will be best to talk to Red Hat representative about this, but from
the project perspective - you can do whatever you want as long as this
is aligned with open source licenses we use. Check all your plugins
and backends you want to use, but the biggest ones are:

https://github.com/theforeman/foreman/blob/develop/LICENSE
https://github.com/Katello/katello/blob/master/LICENSE.txt
https://github.com/pulp/pulp/blob/master/LICENSE
http://www.candlepinproject.org/ is GNU GPLv2, not in code, I filed a
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1520831

I am not sure if Red Hat portal will give you satellite manifests if
you don't have satellite subscription tho. Talk to Red Hat in this
case, without manifest you can't access Red Hat content from Katello.

LZ

On Mon, Dec 4, 2017 at 6:05 PM, Luke Miller  wrote:
> I want to use Foreman / Katello as a replacement for Satellite to manage our
> systems and Redhat patching. What licensing do I need from Redhat for this?
> Do I need the Smart Management licenses or will regular Redhat Licenses work
> as well?
>
> I have a Satellite license right now but our plan is to let it expire. Will
> I have any issues creating or maintaining a subscription manifest after it
> expires?
>
> Thanks a lot!
> Luke
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Unable to join server to Katello

2017-12-05 Thread Lukas Zapletal
Hello,

the error message says it all. Your client does not know server's
certificate. Import it, it's available in http://katello/pub for
download.

LZ

On Tue, Dec 5, 2017 at 1:58 AM, Philippe Conway
 wrote:
> Hello,
>
> I am having issues joining a server to our Katello server.
>
> I receive the following error:
>
> Unable to verify server's identity: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1
> alert unknown ca (_ssl.c:579)
>
> I am running Katello 3.4 on CentOS 7.4. The server I am trying to joing the
> Katello server to is also a CentOS 7.4 server.
>
> I am guessing this is an SSL cert error, but I'm not sure how I could be
> getting this since I am using the cert provided by the Katello server
> itself.
>
> Any ideas? Any help would be greatly appreciated. Thank you.
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Re: [discovery auto-provision] OS parameters ignored when hostgroup parameter present

2017-11-30 Thread Lukas Zapletal
This needs to be debugged, please create a ticket for us.

LZ

On Wed, Nov 29, 2017 at 4:03 PM, Garreat <jmier...@fgtsa.com> wrote:
> Thank you for your reply.
>
> Autoprovision is triggered by user with Administrator rights. In fact, it's
> the initial admin user, 'Administrator' ticked on roles tab.
>
> OS parameter name is 'prov_vgname'.
> Now for the foreman-rake console results:
> Host.find(263).host_params('prov_vgname'): https://pastebin.com/WAa6H2JU
> Host.find(263).host_params: https://pastebin.com/i0JnZvnZ
>
> I got sql debug on so the output is a bit messy. Still, the parameter is
> there, on the bottom of the second paste. As for the first one - I don't
> know, you judge it.
>
> Commenting out the given line does indeed help! At least in my case :).
> Awesome, thanks. I will need you guys once I start the new topic
> (auto-provision vs location).
>
> Regards!
>
> W dniu środa, 29 listopada 2017 14:47:41 UTC+1 użytkownik Lukas Zapletal
> napisał:
>>
>> Does the user who initiates the auto provisioning have "view_params"
>> permission?
>>
>> If you start foreman-rake console and type:
>>
>> Host.find(ID).host_param('param_name')
>>
>> for the already provisioned host, do you get the expected result there?
>>
>> Can you comment out line "return cached_host_params unless
>> cached_host_params.blank?" in host_params.rb and see if it helps?
>>
>> On Wed, Nov 29, 2017 at 1:50 PM, Jacek Mierzwa <jmie...@lbisa.com> wrote:
>> > Thank you for your reply.
>> >
>> > Autoprovisioning doesn't really fail as a whole.
>> > It fails to retrieve hostgroup's OS parameter in the assigned template.
>> > As a
>> > result, I get empty fields instead of values in the rendered PXE
>> > template.
>> > Happens only when at least one hostgroup parameter exists (as explained
>> > in
>> > the original post).
>> > The managed host is indeed created and looks just fine.
>> >
>> > Example host - autoprovisioned few minutes ago - api curl result:
>> > https://pastebin.com/D80t368T
>> > Host's ENC data (YAML dump): https://pastebin.com/Ssezxv4Z
>> >
>> >
>> > Also, I find some inconsistencies in discovery auto-provision VS
>> > locations
>> > -- will start another topic for that.
>> > Thanks once again!
>> >
>> > On Tue, Nov 28, 2017 at 2:40 PM, <ssh...@redhat.com> wrote:
>> >>
>> >>
>> >> I think if the autoprovisioning fails, managed host should be created
>> >> instead of the discovered one.
>> >>
>> >> Can you please send the result of GET /api/v2/hosts/?
>> >>
>> >> Also I would like to see the result of host's ENC rendering. It should
>> >> be
>> >> available through the UI:
>> >> 1. Go to hosts list
>> >> 2. Click on the new host
>> >> 3. Look for YAML button above host's properties table.
>> >>
>> >>
>> >> My wild guess would be that the OS is not set for the host for some
>> >> reason.
>> >>
>> >>
>> >>
>> >> On Tuesday, November 28, 2017 at 12:40:56 AM UTC+2, Garreat wrote:
>> >>>
>> >>> My Foreman version is: Version 1.15.6
>> >>> Discovery plugin: 9.1.5
>> >>>
>> >>> In my PXELinux provisioning template, I use the
>> >>> host_param('param_name')
>> >>> construct to access parameters assigned to the operating system. Just
>> >>> as
>> >>> described here:
>> >>>
>> >>> http://projects.theforeman.org/projects/foreman/wiki/templatewriting#Host-or-host-group-parameters
>> >>> .
>> >>> This works fine -- however...
>> >>>
>> >>> If a single hostgroup parameter exists (don't mistake with Puppet
>> >>> class
>> >>> parameter), then Discovery auto-provision fails to resolve the
>> >>> host_param('param_name') from the operating system parameters.
>> >>> <%= host_param('os_param_name') %> gets populated with nothing (empty
>> >>> string).
>> >>> Same goes for the old syntax <%= @host.params['parameter_name'] %> .
>> >>>
>> >>> This happens only when using auto-provision. Does not occur when:
>> >>> - using 'Provision' on a discovered host
>> >>> - using 'Build' on hosts page
>> >>> - using 'Rebuild

Re: [foreman-users] Re: Changing the default Provisioning Method to Image Based

2017-11-30 Thread Lukas Zapletal
That is not part of hostgroup I guess, so you need to select it
everytime. That would be a RFE?

LZ

On Thu, Nov 30, 2017 at 12:11 AM, Andre Mosin  wrote:
> Did anybody figure out how to change the set a default Provisioning Method?
> I am trying to change to Boot disk based  and can't figure out how.
>
> Thanks!
>
> Andre
>
> On Friday, March 6, 2015 at 12:24:11 AM UTC-8, Magnus Gunnar wrote:
>>
>> I've thought of doing this as well. To automatically set the Compute
>> profile, you can set the profile in your host groups. That works for me.
>> I'm not sure how to set "Provisioning Method" to "Image Based" instead of
>> "Network Based" though..
>> If I find out, I'll let you know..
>>
>> On Thursday, June 5, 2014 at 9:13:42 PM UTC+2, David Haynes wrote:
>>>
>>> I've been trying to change the behavior of the New Hosts page so that the
>>> 'image based' provisioning method is selected and the first available image
>>> in the selector is also selected.
>>> It looks like this is filled in by a series of javascript events: First
>>> on the 'Host Group' selector, then on the 'Compute profile' selector then by
>>> clicking on the 'Image Based' radio button and, finally, selecting the
>>> Image.
>>>
>>> What I would like is for the Compute profile to be automatically set to
>>> the first entry, the Image Based button to be selected and the first entry
>>> in the Image selector to be selected when the Host Group is selected or, as
>>> a fall back, when the Host Group and Compute profile is selected.
>>>
>>> I figure the selectors can be set by setting ':include_blank => false' in
>>> the select_f but I then need to automatically call the ':onchange' to make
>>> the chain of events happen in the right order. The Compute profile selector
>>> would need to call the 'computeResourceSelected()' function and the radio
>>> button would call the 'update_capabilities()' javascript function.
>>>
>>> Any thoughts on this approach? Any hints on implementing it?
>>>
>>> Thanks
>>> -david-
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Re: [discovery auto-provision] OS parameters ignored when hostgroup parameter present

2017-11-29 Thread Lukas Zapletal
Does the user who initiates the auto provisioning have "view_params" permission?

If you start foreman-rake console and type:

Host.find(ID).host_param('param_name')

for the already provisioned host, do you get the expected result there?

Can you comment out line "return cached_host_params unless
cached_host_params.blank?" in host_params.rb and see if it helps?

On Wed, Nov 29, 2017 at 1:50 PM, Jacek Mierzwa  wrote:
> Thank you for your reply.
>
> Autoprovisioning doesn't really fail as a whole.
> It fails to retrieve hostgroup's OS parameter in the assigned template. As a
> result, I get empty fields instead of values in the rendered PXE template.
> Happens only when at least one hostgroup parameter exists (as explained in
> the original post).
> The managed host is indeed created and looks just fine.
>
> Example host - autoprovisioned few minutes ago - api curl result:
> https://pastebin.com/D80t368T
> Host's ENC data (YAML dump): https://pastebin.com/Ssezxv4Z
>
>
> Also, I find some inconsistencies in discovery auto-provision VS locations
> -- will start another topic for that.
> Thanks once again!
>
> On Tue, Nov 28, 2017 at 2:40 PM,  wrote:
>>
>>
>> I think if the autoprovisioning fails, managed host should be created
>> instead of the discovered one.
>>
>> Can you please send the result of GET /api/v2/hosts/?
>>
>> Also I would like to see the result of host's ENC rendering. It should be
>> available through the UI:
>> 1. Go to hosts list
>> 2. Click on the new host
>> 3. Look for YAML button above host's properties table.
>>
>>
>> My wild guess would be that the OS is not set for the host for some
>> reason.
>>
>>
>>
>> On Tuesday, November 28, 2017 at 12:40:56 AM UTC+2, Garreat wrote:
>>>
>>> My Foreman version is: Version 1.15.6
>>> Discovery plugin: 9.1.5
>>>
>>> In my PXELinux provisioning template, I use the host_param('param_name')
>>> construct to access parameters assigned to the operating system. Just as
>>> described here:
>>> http://projects.theforeman.org/projects/foreman/wiki/templatewriting#Host-or-host-group-parameters
>>> .
>>> This works fine -- however...
>>>
>>> If a single hostgroup parameter exists (don't mistake with Puppet class
>>> parameter), then Discovery auto-provision fails to resolve the
>>> host_param('param_name') from the operating system parameters.
>>> <%= host_param('os_param_name') %> gets populated with nothing (empty
>>> string).
>>> Same goes for the old syntax <%= @host.params['parameter_name'] %> .
>>>
>>> This happens only when using auto-provision. Does not occur when:
>>> - using 'Provision' on a discovered host
>>> - using 'Build' on hosts page
>>> - using 'Rebuild config'  on hosts page
>>>
>>>
>>> Probably just a minor code stuff... Help appreciated.
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Foreman users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/foreman-users/lT1x-_iye5I/unsubscribe.
>> To unsubscribe from this group and all its topics, 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.
>
>
>
>
> --
>
> Jacek Mierzwa
> Systems Integration Engineer
>
> NOVOMATIC Technologies Poland S.A.
> (formerly ATSI S.A.)
>
> Krakowska 368Position
> 32-080 Zabierzów
> Poland, Europe
>
> Tel.: +48 12 617 67 15
> www.novomatic-tech.com
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Feedback wanted - migrate mailing lists to a forum?

2017-11-24 Thread Lukas Zapletal
Yeah, I was thinking something very small and grey - opposite of
distracting big blue button.

LZ

On Fri, Nov 24, 2017 at 3:44 PM, Ivan Necas <ine...@redhat.com> wrote:
>
> On Fri, 24 Nov 2017 at 10:01, Lukas Zapletal <l...@redhat.com> wrote:
>>
>> >> The most annoying is the big blue button for me, I'd prefer some
>> >> small light-gray link instead (if any).
>> >
>> > As I say, I only see that in HTML-view, are you definitely in plaintext
>> > mode?
>>
>> I am not actually, I migrated from Mutt to GMail recently and I have
>> no option other than HTML here.
>>
>> If folks would not mind, I'd like to change that to something
>> reasonable. Here is what I propose: I will file a patch to Discourse
>> and we can apply it onto our instance immediately as I expect longer
>> discussion (perhaps an option or they might not like it at all).
>
>
> The big blue button is a bit annoying and just a simple link would work much
> better for me. Worth giving it a try.
>
> -- Ivan
>
>>
>>
>> --
>>
>> Later,
>>   Lukas @lzap Zapletal
>>
>> --
>> 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.
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Feedback wanted - migrate mailing lists to a forum?

2017-11-24 Thread Lukas Zapletal
>> The most annoying is the big blue button for me, I'd prefer some
>> small light-gray link instead (if any).
>
> As I say, I only see that in HTML-view, are you definitely in plaintext
> mode?

I am not actually, I migrated from Mutt to GMail recently and I have
no option other than HTML here.

If folks would not mind, I'd like to change that to something
reasonable. Here is what I propose: I will file a patch to Discourse
and we can apply it onto our instance immediately as I expect longer
discussion (perhaps an option or they might not like it at all).

--

Later,
  Lukas @lzap Zapletal

-- 
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] Cluster installation CentOS 7.4 network problems

2017-11-24 Thread Lukas Zapletal
Hello,

I never heard of these and I can confirm we haven't changed much
around this in the last release, as you can see our kickstart simply
use default network configuration, thus NetworkManager. I think you
need to reach out to CentOS groups or better test on RHEL and create
Bugzilla for NetworkManager.

Doublecheck your DHCP, in case of slow DHCP responses things can go bad.

On Thu, Nov 23, 2017 at 9:44 PM, Vadim Bulst  wrote:
> Hi there,
>
> after using Foreman successful on our clusters for more than a year. I'd
> like to reinstall a 90 node cluster with Centos 7.4. It's now running on
> Centos 7.3 . I'm not able to just update to 7.4 because of zfsonlinux
> dependencies and well - some nodes died and had to bare metal install them.
>
> So I was able to install these nodes successfully by pxe-booting and using a
> regular CentOS mirror. After the final reboot the nodes g ot no network
> connection at all and puppet wasn't able to pull of course. After logging in
> locally and restart NetworkManager the connection came up - sometimes on the
> first try sometimes on the second try. I never discovered such behavior with
> Centos 7.3 or 7.2.
>
> Network properties:
>
> DHCP, MTU 9000
>
> DHCP-Server not Foreman managed, on different network
>
> TFTP-Server Foreman managed, on different network
>
>
> I've read one thread on stackexchange which describes a simular problem
> using a kickstart installation and dhcp network configuration on Centos 7.4
>
> https://unix.stackexchange.com/questions/396096/centos-7-network-service-failed-to-start-because-systemd-starts-the-daemon-too
>
>
> Does any body of you discovered similar problems?
>
> This is what my provisioning template / kickstart template looks like:
>
>
>
> install
> url --url http://mirror.centos.org/centos/7.4.1708/os/x86_64
> --proxy=http://proxy.uni-leipzig.de:3128
> lang en_US.UTF-8
> selinux --enforcing
> keyboard de
> skipx
>
> network --bootproto dhcp --hostname galaxy110.sc.uni-leipzig.de
> --device=somemacaddress
> rootpw --iscrypted foo
> firewall --service=ssh
> authconfig --useshadow --passalgo=SHA256 --kickstart
> timezone --utc Europe/Berlin
> services --disabled
> gpm,sendmail,cups,pcmcia,isdn,rawdevices,hpoj,bluetooth,openibd,avahi-daemon,avahi-dnsconfd,hidd,hplip,pcscd
>
>
>
>
> bootloader --location=mbr --append="nofb quiet splash=quiet"
>
>
> zerombr
> clearpart --initlabel --all
> ignoredisk --only-use=sda
> part biosboot --size 1 --fstype=biosboot --asprimary
> part / --fstype=xfs --size=20480 --asprimary --ondisk=sda
> part swap --size=131072 --ondisk=sda
> part /var/log --fstype=xfs --size=10240 --ondisk=sda
> part /home --fstype=xfs --size=10240 --grow --ondisk=sda
>
>
>
>
> text
> reboot
>
> %packages
> yum
> dhclient
> ntp
> wget
> @Core
> redhat-lsb-core
> %end
>
> %post --nochroot
> exec < /dev/tty3 > /dev/tty3
> #changing to VT 3 so that we can see whats going on
> /usr/bin/chvt 3
> (
> cp -va /etc/resolv.conf /mnt/sysimage/etc/resolv.conf
> /usr/bin/chvt 1
> ) 2>&1 | tee /mnt/sysimage/root/install.postnochroot.log
> %end
> %post
> logger "Starting anaconda galaxy110.sc.uni-leipzig.de postinstall"
> exec < /dev/tty3 > /dev/tty3
> #changing to VT 3 so that we can see whats going on
> /usr/bin/chvt 3
> (
>
>
>
>
> #update local time
> echo "updating system time"
> /usr/sbin/ntpdate -sub 139.18.1.2
> /usr/sbin/hwclock --systohc
>
> # Yum proxy
> echo 'proxy = http://proxy.uni-leipzig.de:3128' >> /etc/yum.conf
>
> rpm -Uvh --httpproxy proxy.uni-leipzig.de --httpport 3128
> https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
>
>
> # update all the base packages from the updates repository
> if [ -f /usr/bin/dnf ]; then
>   dnf -y update
> else
>   yum -t -y update
> fi
>
>
> # SSH keys setup snippet for Remote Execution plugin
> #
> # Parameters:
> #
> # remote_execution_ssh_keys: public keys to be put in ~/.ssh/authorized_keys
> #
> # remote_execution_ssh_user: user for which remote_execution_ssh_keys will
> be
> #authorized
> #
> # remote_execution_create_user: create user if it not already existing
> #
> # remote_execution_effective_user_method: method to switch from ssh user to
> # effective user
> #
> # This template sets up SSH keys in any host so that as long as your public
> # SSH key is in remote_execution_ssh_keys, you can SSH into a host. This
> only
> # works in combination with Remote Execution plugin.
>
> # The Remote Execution plugin queries smart proxies to build the
> # remote_execution_ssh_keys array which is then made available to this
> template
> # via the host's parameters. There is currently no way of supplying this
> # parameter manually.
> # See http://projects.theforeman.org/issues/16107 for details.
>
>
>
>
>
>
> rpm -Uvh --httpproxy proxy.uni-leipzig.de --httpport 3128
> https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
>
>
>
>
> if [ -f /usr/bin/dnf ]; then
> 

Re: [foreman-users] Feedback wanted - migrate mailing lists to a forum?

2017-11-23 Thread Lukas Zapletal
Thanks for answers, as long as you will keep pushing changes upstream
and try to solve some of my concerns, that'd be fine. The most
annoying is the big blue button for me, I'd prefer some small
light-gray link instead (if any). I understand that's only my personal
preference, you could possibly push this upstream as user-configurable
option. Not being able to reply to myself is not huge deal as you can
merge threads which are mis-posted that's fine. Bringing possibility
to edit posts down to 5 minutes seems like a reasonable solution,
still allows you to quickly fix mis-formatting but makes sure people
are not doing crazy edits afterwards.

Re nabble - I tried to integrate a test archive, created an account
but it did not work - mails did not show up (although they were sent,
I was receiving copies). For some reason Nabble ignored them. So I
deleted the archive place and removed the testing account. At the end
of the day, I'd prefer mail-archive.com or gmane.org as these are
pretty much top archival sites. As an alternative (if integration
fails), I'd be fine with integrating with any kind of mail archival
tool locally and offering some downloads in mbox formats (e.g. via
rsync or plain http). HTML interface is not needed, I just want to
have mbox-based copies somewhere else than Discourse database (ideally
on a different host). That's really all, mail-archive.com seemed like
a good option (backup of backup).

Allright, I am not super excited but as long as I won't see the huge
button for every single post and we lock down edits a bit more strict
(5-10 minutes) and we will have some standard (mbox) archive somewhere
else (*), I am good.

If integration with mail-archive.com fails, I can step in and help
with setting up such an archive somewhere else.

On Wed, Nov 22, 2017 at 11:59 AM, Greg Sutcliffe
<g...@emeraldreverie.org> wrote:
> Heya!
>
> Answers in-line, but I wanted to put a quick summary here for folks in a
> hurry. Most, if not all, of these questions are *technical* in nature -
> they are things we can alter, either by existing settings, or by
> altering the Discourse code. I see this as similar to our Redmine
> instance - we've taken a FOSS tool and customized it to our needs, both
> via code changes and plugins.
>
> More generally, though, your post reads as a direct comparison to a
> mailing list, and as I said in my opening post, I don't think a mailing
> list is right for us anymore.
>
> I'm not trying to mislead on this point. The mailing list mode that
> Discourse offers *is* different, yes, so a direct comparision is likely
> to find flaws. The real question is whether the *other* things it does
> are worth the cost. I know (from our chat on the dev list) that you
> don't agree with my conclusions about our needs as a community, so we're
> going to end up differing on whether it's worthwhile.
>
> If we migrate, then some "getting used to" is going to be needed, for
> sure. A balance of tweaks vs change-acceptance will no doubt be found,
> some of which I expect to be altered *after* we migrate. We don't have
> to set *everything* in stone on day 1 (and that flexibility is one of
> the things I like). Some things may be possible to do per-user, which is
> even better (again, flexibility to interact with the community as each
> user wants to).
>
> OK, specific answers:
>
> On 21/11/17 15:09, Lukas Zapletal wrote:
>> 1) Edits are not propagated to e-mail only users, I edited a post
>> andnever got an e-mail about this.
>
>> 5) Email response is slow, I know there is some polling, but this is
>>  simply limiting and web users are inadvantage as they see the
>> content earlier.
>
> There is no polling now, that was temporary. Inbound email is instantly
> visible in the UI.
>
> Outbound email is delayed 5 min so that people have a chance to spot
> typos, missed links etc in their posts (in the UI ofc) before the emails
> are sent. I really don't think 5 minutes is a big deal, a quick scan of
> our lists suggests average response time is Order(hours) - to claim it's
> a disadvantage seems a bit of a jump. It seems an acceptable tradeoff to
> get allow posts to be correct when sent in the first place, cutting down
> on "oops, forgot the link" style followups.
>
> As for editing, there is a limit on the length of time you can edit your
> posts, currently that seems to default to 60 days (seems too high to me,
> for sure). I guess we could set it to the same 5 mins as above, so that
> no editing can be done after mails are sent, if this is a significant
> concern for people.
>
>> 2) It seems you can't reply to yourself via email, this often
>> happens if you need to correct yourself.
>
> This needs some context for those following along, and it's actually a
> secur

Re: [foreman-users] Feedback wanted - migrate mailing lists to a forum?

2017-11-21 Thread Lukas Zapletal
Greg,

I gave Discourse another try via e-mail but I have some issues:

1) Edits are not propagated to e-mail only users, I edited a post and
never got an e-mail about this. If this is a feature (I don't get
notification on my own edits), that's fine, but otherwise this creates
a huge hole as you can miss content.
2) It seems you can't reply to yourself via email, this often happens
if you need to correct yourself. This is because you need the reply
token, otherwise reply will lead to a new thread - this is broken in
many clients but some do have ability to correctly reply usually via
Reply to List feature (Mutt, Thunderbird via plugin). Discourse let
you opt-in to receive copies which makes your folder a mess and you
still need to wait because of (4).
3) All emails contain huge button to visit the thread, this is not an
email interface but notification with some ability to reply. Not a
great reading experience. Maybe we can edit the footer and make this a
very small text with just non-intrusive link?
4) Does not support text/plain emails, it just send both in MIME which
is "good enough" according to devs. I would love to *have* all emails
in plain text because integration with other things like mailing list
archives, bots or simply gmail users who cannot turn off HTML viewing
by default. Solving (3) might improve reading experience for poor
gmail users in HTML tho.
5) Email response is slow, I know there is some polling, but this is
simply limiting and web users are in advantage as they see the content
earlier.
6) Your MUA is collecting "sent addresses" as these are randomized
addresses. Perhaps not a big deal.
7) Similarly to (1) there are tons of other actions in the web UI
without e-mail notifications - "mailing list" users are put aside.
8) It's a notification system not a mailing list interface, please do
carefully communicate this towards users.

If we choose to migrate, we will see users moving towards web UI not
because it's good with all the shiny features, but because mailing
list mode is terrible experience.

Now, on a different topic, with possible migration we will likely
loose 3rd party archives. Our groups are already being archived at
several places, for example the world famous:

https://www.mail-archive.com/foreman-users@googlegroups.com/index.html

The way this works is usually there is a registered user that receives
all e-mails creating such an archive. There are multiple similar
services, GMANE perhaps the second most well known and Nabble is also
in wide use. I want not to break having this read-only for-life
archive which anybody can user or download. It can still serve as a
read-only backup when the service is down (e.g. planned outages) and
most importantly if we experience some mailing list integration
misbehavior we can all look into the "archive" to see what is being
sent and how it looks in text mode. This will be also here as an
archive of all emails sent, because if someone edits an entry and
there will be discussion around the edit, we can always look into the
archive. At the end, it's how people using mailing list interface will
read all content.

Theoretically anybody can setup such an integration, but some
administration or contacting mail-archive people might be required in
order to make sure the account does not get deleted and receives all
(publicly visible) emails. Big question is how this will work with
Discourse "MIME only HTML+plain" format. Therefore I would like to
request this to be put on TODO list ideally with priority so we have
continuous mailing list archive for the future. Details are here:

https://www.mail-archive.com/faq.html#newlist

In short, just "subscribe arch...@mail-archive.com to the mailing
list" and make sure the account does not get deleted (e.g. expiration
after X years). But something tells me this will fails and emails
coming from Discourse will not be readable in such an archive due to
MIME/HTML thing, let's see.

Then, you showed how easy is to import content into Discourse, but I
would like to read something about what is the plan if this whole
project fails. I tried to google some info about how to migrate from
it, but apart from some "data liberation" download links in weird
format (non-mbox/maildir) I could not find anything. We should at
least have a plan how to approach this and what our options are to
move back to mailing list.

And lastly, I see lukas_zapletal1 accounts, I was likely posting under
same name but different emails into the list. Is there some kind of
merge? Would like to only have one account with proper name, proper
nick and multiple emails owning all my posts. I briefly saw some
discussion around but I understand it is not possible, there are some
workarounds: https://meta.discourse.org/t/ability-to-merge-users/9220/75

On Thu, Nov 16, 2017 at 6:16 PM, Greg Sutcliffe  wrote:
> Hi all
>
> TL;DR lets migrate to Discourse (forum software, self-hosted). I hope
> you'll read the rest of this 

[foreman-users] Foreman Discovery Image 3.4.2 is out

2017-11-03 Thread Lukas Zapletal
Hey,

I pushed new minor version of FDI yesterday. It includes one annoying bug fix:

Fixes #20603 - Disable kernel messages on tty1

It also adds small package called "kbd" which will be used in the
future to switch overe to tty2 during kexec to prevent terminal
freezing.

Fixes #20548 - added kbd package

Download here or use our puppet installer to do it for you.

http://downloads.theforeman.org/discovery/releases/3.4/

-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Discovery iso: Missing EFI file (/boot/efi/EFI/*/gcdx64.efi)

2017-10-30 Thread Lukas Zapletal
I am on latest stable Fedora, haven't done anything special, but this
is my development instance, I might have some packages that clean
installation don't have. It should be as easy as:

https://github.com/theforeman/foreman-discovery-image#building

Quick look into yum/dnf database shows this package you are missing: dracut-live

Try to grab it and see if it works, file a README update if you are
using clean environment, there might be other missing bits, thanks!

LZ

On Fri, Oct 27, 2017 at 3:33 PM, Oleg Mcnoleg  wrote:
> Hi LZ, thanks for the reply.
>
> Do you have any specifics around your Fedora build env?
>
> Using a fresh Fedora 26 install and latest master.zip, I'm modifying
> 00-repos-f21.ks and pointing to nightly f24. At which point the
> build-livecd-root finishes but I get an offensive message:
>
> dracut: dracut module 'dmsquash-live' cannot be found or installed.
> mkinitrd failed
>
>
> Followed by:
>
> The ISO image doesn't look like a LiveCD ISO image to me.
>
> Which version of Fedora are you building on and what is the contents of your
> fedora ks files?
>
> Thanks a lot.
>
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] How to display IPMI consoles in the Foreman?

2017-10-30 Thread Lukas Zapletal
I can do the discovery part, but frankly not fully understand what
exactly how do we grab the fact value. Is that some value that needs
to be fetched from iDRAC API?

LZ

On Fri, Oct 27, 2017 at 12:47 PM, Konstantin Lepikhov
 wrote:
> Hi Greg!
>
> On 10/27/2017, at 10:25:20 AM you wrote:
>
>> On Thu, 2017-10-26 at 17:37 +0200, Konstantin Lepikhov wrote:
>> >
>> > You need to replace novnc js code in foreman by js code from kelleyk
>> > version + modify foreman host controller. Then you can connect
>> > to servers's bmc ikvm via foreman's websockify.
>> >
>> > Another thing - extend host inventory adding properties related
>> > connection/bmc_type.
>>
>> This sounds like an excellent thing to send a patch for, if you're
>> interested - or at least log a feature request with some tips on wiring
>> it up. Then it can be available for everyone :)
>>
>> Greg
>>
> I've checked the source, it doesn't looks hard to add it:
>
> 1) we need to extend discovery to provide extra attributes for kvm
> functionality (it could be either 'idrac_vnc' DELL or 'sm_vnc' for 
> Supermicro).
>
> 2) add novnc ikvm js to vendor/assets/javascripts.
>
> 3) add custom app/views/hosts/console/*.html.erb for ikvm vnc which
> includes ikvm nonvc.
>
> 4) extend console in app/controllers/hosts_controller.rb to handle _vnc
> atrributes for physical boxes too
>
> PROFIT.
>
> So I just need a hardware to test and then I can make a patch :)
>
> --
> WBR et al.
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Foreman - Solaris 11 install

2017-10-30 Thread Lukas Zapletal
Glad you sorted it out.

We do appreciate tutorials, blog posts, puppet PRs for the installer
or simply just community-templates you are using for provisioning.
Currently we only have this in the codebase:

https://github.com/theforeman/community-templates/blob/e6f8f14bd93e7fb57ce4718b869aec1326898f13/provisioning_templates/PXEGrub/jumpstart_default_pxegrub.erb

Feel free to provide updated versions or whatever is needed (I have no
clue how Solaris provisioning workflow looks like to be honest).

LZ

On Sat, Oct 28, 2017 at 2:11 AM, Trisha Hoang  wrote:
> Lukas, you have been proven correct on both counts. The client wanted an IP
> and the driver did not understand the request. After changing the driver,
> the install continued and I almost kissed the monitor.
>
> If it helps other people from pulling out their hair, I can do more testing
> before documenting it and sending it to you.
>
> Thank you for a great tool.
> Trisha
>
> On Friday, October 27, 2017 at 3:44:27 AM UTC-7, Greg Sutcliffe wrote:
>>
>> On Mon, 2017-10-23 at 16:14 -0700, Trisha Hoang wrote:
>> > Hello Foreman users,
>> >
>> > From my understanding, there is no support for Solaris 11 install on
>> > Foreman. Not sure if the reason is that Solaris 11 has its own
>> > automated installer or if there are technical challenges.
>>
>> Lukas is doing a great job of helping you out, so I'll just answer this
>> point... Much of our OS support comes from the community, so it's up to
>> people like yourselves to contribute it. The core development team only
>> has so much time, after all. The reason we have no support for Solaris
>> 11 is as simple as no-one has written it yet :)
>>
>> If you'd like to contribute your patches as a pull request once you're
>> happy with them, please do!
>>
>> Thanks
>> Greg
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Re: WebSock error: [object Event]

2017-10-27 Thread Lukas Zapletal
Please read and copy paste all lines from Troubleshooting and Known
Issues section and make note to each of them, if you tested this and
how.

I can hardly help you - all I need is "it does not work". But 90% of
issues are listed here ^^^

On Thu, Oct 26, 2017 at 4:36 PM, subramaniyan.R <subup...@gmail.com> wrote:
> Hi Lzap,
>   Thanka for your reply. I'm following the same article,but not able to get
> the console for libvirt, getting the same error.can you help me to trace the
> issue?
>
> On Oct 26, 2017 7:25 PM, "Lukas Zapletal" <l...@redhat.com> wrote:
>
> Please read:
>
> https://theforeman.org/manuals/1.15/index.html#7.1NoVNC
>
> and follow the instructions there.
>
> LZ
>
> On Thu, Oct 26, 2017 at 7:04 AM, Subramaniyan .R <subup...@gmail.com> wrote:
>> i have used libvirt,
>>
>> On Wednesday, 25 October 2017 19:14:34 UTC+5:30, Lukas Zapletal wrote:
>>>
>>> What compute resource is it? This will only work with libvirt and
>>> oVirt/RHEV I believe.
>>>
>>> LZ
>>>
>>> On Tue, Oct 24, 2017 at 8:28 AM, Subramaniyan .R <subu...@gmail.com>
>>> wrote:
>>> > Hi All,
>>> >Can any one help me on this below error ?   "WebSock error: [object
>>> > Event]" error.
>>> >
>>> >
>>> > 2017-10-24 11:54:18 efa2e55c [app] [D] Starting VNC Proxy:
>>> > /usr/share/foreman/extras/noVNC/websockify.py --daemon
>>> > --idle-timeout=120
>>> > --timeout=120 5913 kvm.radisys.com:5907 --cert
>>> > /etc/puppetlabs/puppet/ssl/certs/certnew.pem --key
>>> > /etc/puppetlabs/puppet/ssl/private_keys/my-private-key.pem
>>> > 2017-10-24 11:54:18 efa2e55c [app] [D] [WARNING: no 'numpy' module,
>>> > HyBi
>>> > protocol will be slower
>>> >  |
>>> > 2017-10-24 11:54:18 efa2e55c [app] [D] VNCProxy Error: WebSocket server
>>> > settings:
>>> >  |
>>> > 2017-10-24 11:54:18 efa2e55c [app] [D] VNCProxy Error:   - Listen on
>>> > :5913
>>> >  |
>>> > 2017-10-24 11:54:18 efa2e55c [app] [D] VNCProxy Error:   - Flash
>>> > security
>>> > policy server
>>> >  |
>>> > 2017-10-24 11:54:18 efa2e55c [app] [D] VNCProxy Error:   - SSL/TLS
>>> > support
>>> >  |
>>> > 2017-10-24 11:54:18 efa2e55c [app] [D] VNCProxy Error:   -
>>> > Backgrounding
>>> > (daemon)
>>> >
>>> >
>>> > Regards,
>>> > Subramaniyan.R
>>> >
>>> >
>>> > On Wednesday, 11 June 2014 17:26:16 UTC+5:30, Jorick Astrego wrote:
>>> >>
>>> >> Hi,
>>> >>
>>> >> After hooking up a libvirt server to foreman I'm unable to access the
>>> >> VNC console. I already checked everything from
>>> >> http://theforeman.org/manuals/1.5/index.html#7.1NoVNC but I still get
>>> >> the "WebSock error: [object Event]" error.
>>> >>
>>> >> I've set "network.websocket.allowInsecureFromHTTPS" to true on
>>> >> firefox-29.0.1-1.fc20.x86_64 and telnet to the vnc port is working
>>> >> from
>>> >> both my workstation and the foreman server. Also there is a
>>> >> websocket.py
>>> >> running and the port is connectable with telnet.
>>> >>
>>> >> I cannot test chrome because the "Allow insecure WebSocket from https
>>> >> origin" option is not available in chromium 34 which is the latest I
>>> >> get
>>> >> from a repo.
>>> >>
>>> >> Also tried it on a windows 7 machine with chrome with the same error.
>>> >>
>>> >> Anything else I can do to debug?
>>> >>
>>> >> Kind regards,
>>> >>
>>> >> Jorick Astrego
>>> >> Netbulae B.V.
>>> >>
>>> > --
>>> > 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-user...@googlegroups.com.
>>> > To post to this group, send email to forema...@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] Lots of "Mysql2::Error: Deadlock found when trying to get lock" under increased load

2017-10-27 Thread Lukas Zapletal
Try to change to :validate => true but beware there might be dragons. I do
not remember why we set this.

LZ

On Thu, Oct 26, 2017 at 6:20 PM, 'Konstantin Orekhov' via Foreman users <
foreman-users@googlegroups.com> wrote:

> Ok. Is there anything I could do now to workaround this? The only thing
> worked for me so far was to periodically go through discovered hosts  and
> remove duplicate entries.
>
> Thanks!
> Konstantin.
>
> On Oct 26, 2017, at 07:18, Lukas Zapletal <l...@redhat.com> wrote:
>
> Ok this confirms it. http://projects.theforeman.org/issues/21479 we will
> fix later.
>
> We don't have an unique index on DB level, just in Rails level and a
> second NIC with same MAC can sneak in. The relevant code in core is:
>
> validate :mac_uniqueness, :if => Proc.new { |nic| nic.managed? &&
> nic.host && nic.host.managed? && !nic.host.compute? && !nic.virtual? &&
> nic.mac.present? }
>
> which will not trigger for Discovery at all (host is not managed). In
> discovery we try to search for existing host and if not found, we will
> create new discovered host. This does not work correctly, we have turned
> off validator for some reason:
>
> host.save(:validate => false) if host.new_record?
>
> So the validation for uniqueness won't hit.
>
>
> On Wed, Oct 25, 2017 at 6:50 PM, 'Konstantin Orekhov' via Foreman users <
> foreman-users@googlegroups.com> wrote:
>
>>
>>
>>> Please use foreman-rake (I assume this is a packaged .deb install).
>>>
>>>
>> This is CentOS7 install and foreman-rake did work. Here's the result:
>>
>> [root@spc01 ~]# cd ~foreman
>> [root@spc01 foreman]# foreman-rake console
>> Successfully encrypted field for Setting::Auth oauth_consumer_key
>> Successfully decrypted field for Setting::Auth oauth_consumer_key
>> Successfully decrypted field for Setting::Auth oauth_consumer_key
>> Successfully decrypted field for Setting::Auth oauth_consumer_key
>> Successfully decrypted field for Setting::Auth oauth_consumer_key
>> Successfully encrypted field for Setting::Auth oauth_consumer_secret
>> Successfully decrypted field for Setting::Auth oauth_consumer_secret
>> Successfully decrypted field for Setting::Auth oauth_consumer_secret
>> Successfully decrypted field for Setting::Auth oauth_consumer_secret
>> Successfully decrypted field for Setting::Auth oauth_consumer_secret
>> /usr/share/foreman/lib/tasks/console.rake:6: warning: already
>> initialized constant ARGV
>> For some operations a user must be set, try User..current = User.first
>>
>> Loading production environment (Rails 4.2.5.1)
>> Failed to load console gems, starting anyway
>> irb(main):001:0> ::Nic::Managed.where(:mac => "b4:99:ba:aa:4b:64",
>> :primary => true)
>> => #> "b4:99:ba:aa:4b:64", ip: "10.8.161.191", type: "Nic::Managed", name:
>> "macb499baaa4b64", host_id: 458555, subnet_id: nil, domain_id: nil, attrs:
>> {"netmask"=>"255.255.255.0", "mtu"=>"1500", "network"=>"10.8.161.0",
>> "speed"=>"1000", "duplex"=>"full", "port"=>"Twisted Pair",
>> "auto_negotiation"=>"true", "wol"=>true}, created_at: "2017-10-20
>> 03:44:00", updated_at: "2017-10-20 03:44:02", provider: nil, username: nil,
>> password: nil, virtual: false, link: true, identifier: "eth0", tag: "",
>> attached_to: "", managed: true, mode: "balance-rr", attached_devices: "",
>> bond_options: "", primary: true, provision: true, compute_attributes: {},
>> execution: true, ip6: nil, subnet6_id: nil>]>
>> irb(main):002:0>
>>
>> However, just as in my previous example, DB has 2 different IDs with that
>> MAC:
>>
>> [root@spc01 ~]# mysql -u foreman -p$DB_PASS foreman -e "SELECT * FROM
>> hosts WHERE type = 'Host::Discovered' and NAME = 'macb499baaa4b64'\G;"
>> *** 1. row ***
>>   id: 430926
>> name: macb499baaa4b64
>> last_compile: NULL
>>  last_report: 2017-09-30 06:56:07
>>   updated_at: 2017-09-30 06:56:09
>>   created_at: 2017-03-17 14:09:15
>>root_pass: NULL
>>  architecture_id: NULL
>>   operatingsystem_id: NULL
>>   environment_id: NULL
>>ptable_id: NULL
>>

Re: [foreman-users] Lots of "Mysql2::Error: Deadlock found when trying to get lock" under increased load

2017-10-26 Thread Lukas Zapletal
Ok this confirms it. http://projects.theforeman.org/issues/21479 we will
fix later.

We don't have an unique index on DB level, just in Rails level and a second
NIC with same MAC can sneak in. The relevant code in core is:

validate :mac_uniqueness, :if => Proc.new { |nic| nic.managed? &&
nic.host && nic.host.managed? && !nic.host.compute? && !nic.virtual? &&
nic.mac.present? }

which will not trigger for Discovery at all (host is not managed). In
discovery we try to search for existing host and if not found, we will
create new discovered host. This does not work correctly, we have turned
off validator for some reason:

host.save(:validate => false) if host.new_record?

So the validation for uniqueness won't hit.


On Wed, Oct 25, 2017 at 6:50 PM, 'Konstantin Orekhov' via Foreman users <
foreman-users@googlegroups.com> wrote:

>
>
>> Please use foreman-rake (I assume this is a packaged .deb install).
>>
>>
> This is CentOS7 install and foreman-rake did work. Here's the result:
>
> [root@spc01 ~]# cd ~foreman
> [root@spc01 foreman]# foreman-rake console
> Successfully encrypted field for Setting::Auth oauth_consumer_key
> Successfully decrypted field for Setting::Auth oauth_consumer_key
> Successfully decrypted field for Setting::Auth oauth_consumer_key
> Successfully decrypted field for Setting::Auth oauth_consumer_key
> Successfully decrypted field for Setting::Auth oauth_consumer_key
> Successfully encrypted field for Setting::Auth oauth_consumer_secret
> Successfully decrypted field for Setting::Auth oauth_consumer_secret
> Successfully decrypted field for Setting::Auth oauth_consumer_secret
> Successfully decrypted field for Setting::Auth oauth_consumer_secret
> Successfully decrypted field for Setting::Auth oauth_consumer_secret
> /usr/share/foreman/lib/tasks/console.rake:6: warning: already initialized
> constant ARGV
> For some operations a user must be set, try User.current = User.first
> Loading production environment (Rails 4.2.5.1)
> Failed to load console gems, starting anyway
> irb(main):001:0> ::Nic::Managed.where(:mac => "b4:99:ba:aa:4b:64",
> :primary => true)
> => # "b4:99:ba:aa:4b:64", ip: "10.8.161.191", type: "Nic::Managed", name:
> "macb499baaa4b64", host_id: 458555, subnet_id: nil, domain_id: nil, attrs:
> {"netmask"=>"255.255.255.0", "mtu"=>"1500", "network"=>"10.8.161.0",
> "speed"=>"1000", "duplex"=>"full", "port"=>"Twisted Pair",
> "auto_negotiation"=>"true", "wol"=>true}, created_at: "2017-10-20
> 03:44:00", updated_at: "2017-10-20 03:44:02", provider: nil, username: nil,
> password: nil, virtual: false, link: true, identifier: "eth0", tag: "",
> attached_to: "", managed: true, mode: "balance-rr", attached_devices: "",
> bond_options: "", primary: true, provision: true, compute_attributes: {},
> execution: true, ip6: nil, subnet6_id: nil>]>
> irb(main):002:0>
>
> However, just as in my previous example, DB has 2 different IDs with that
> MAC:
>
> [root@spc01 ~]# mysql -u foreman -p$DB_PASS foreman -e "SELECT * FROM
> hosts WHERE type = 'Host::Discovered' and NAME = 'macb499baaa4b64'\G;"
> *** 1. row ***
>   id: 430926
> name: macb499baaa4b64
> last_compile: NULL
>  last_report: 2017-09-30 06:56:07
>   updated_at: 2017-09-30 06:56:09
>   created_at: 2017-03-17 14:09:15
>root_pass: NULL
>  architecture_id: NULL
>   operatingsystem_id: NULL
>   environment_id: NULL
>ptable_id: NULL
>medium_id: NULL
>build: 0
>  comment: NULL
> disk: NULL
> installed_at: NULL
> model_id: 7
>
> hostgroup_id: NULL
> owner_id: 10
>   owner_type: User
>  enabled: 1
>   puppet_ca_proxy_id: NULL
>  managed: 0
>use_image: NULL
>   image_file: NULL
> uuid: NULL
>  compute_resource_id: NULL
>  puppet_proxy_id: NULL
> certname: NULL
> image_id: NULL
>  organization_id: NULL
>  location_id: NULL
> type: Host::Discovered
>  otp: NULL
> realm_id: NULL
>   compute_profile_id: NULL
> provision_method: NULL
>grub_pass:
>global_status: 0
> lookup_value_matcher: NULL
>discovery_rule_id: NULL
>salt_proxy_id: NULL
>  salt_environment_id: NULL
>   pxe_loader: NULL
> *** 2. row ***
>   id: 458555
> name: macb499baaa4b64
> last_compile: NULL
>  last_report: 2017-10-25 16:47:08
>   updated_at: 2017-10-25 16:47:09
>   created_at: 2017-10-20 03:44:00
>
>root_pass: NULL
>  architecture_id: NULL
>   operatingsystem_id: NULL
>   environment_id: NULL
>ptable_id: NULL
>medium_id: NULL
>build: 0
>  comment: NULL
>  

Re: [foreman-users] Re: Foreman - Solaris 11 install

2017-10-26 Thread Lukas Zapletal
Looks like you messed up DHCP configuration. If you deployed it via
our installer, you can re-run it to fix it for you:

foreman-installer -v -n

With -n you get "dry run" to see what would puppet do, then you can
run it for real.

Reservations are not stored anywhere else then in leases file, nope.
Well in Foreman itself of course.

Running SELinux? I'd check that. It is likely some configuration mistake there.

Once you get provisioning working, make sure to update our templates
in community-repo!

LZ

On Wed, Oct 25, 2017 at 11:33 PM, Trisha Hoang <trishaho...@gmail.com> wrote:
> You are most likely right Lukas.
>
> I've overlooked at the 'option domain-name-servers' in dhcpd.conf
> configuration file. It's pointing to itself and not the DNS server. Now I
> just need to prove you're right but after mucking around with dhcpd.leases,
> OMAPI is no longer cooperating 'Can't start OMAPI protocol: address not
> available'. I've tried deleting all relevant hosts and emptying out the
> dhcpd.leases file, rebooting both Foreman master and proxy. Nothing seems to
> work. Is the information being stored somewhere else?
>
> On Wednesday, October 25, 2017 at 5:41:02 AM UTC-7, Lukas Zapletal wrote:
>>
>> Hey Trisha,
>>
>> the error smells like a name resolution error, have you checked  DNS?
>> Does the DHCP server provide correct DNS info, so the system can
>> resolve installation media or other services involved in provisioning?
>>
>> Now, the DHCP is really expected to just work. Are you using the ISC
>> DHCP deployed by our installer, or some different configuration? I
>> assume that by "static IP from DHCP" you mean "IP address
>> reservation".
>>
>> Since the initial DHCP request was done by preboot environment and
>> second is done by Solaris, I bet there is a bug in network driver. Are
>> you using correct driver? Can you swap it out for some different card?
>>
>> I am not sure I get your scenario 2. That looks like some DHCP client
>> miscommunication.
>>
>> On Tue, Oct 24, 2017 at 7:10 PM, Trisha Hoang <trish...@gmail.com> wrote:
>> > The installation fails and ends with this error message.
>> >
>> > auditd[130]: getaddrinfo() failed[node name or service name not known].
>> > auditd[130]: adt_get_local_address failed, no Audit IP address
>> > available,
>> > faking loopback for   and error Network is  down.
>> >
>> >
>> > On Tuesday, October 24, 2017 at 2:49:00 AM UTC-7, Trisha Hoang wrote:
>> >>
>> >> Hello Foreman users,
>> >>
>> >> From my understanding, there is no support for Solaris 11 install on
>> >> Foreman. Not sure if the reason is that Solaris 11 has its own
>> >> automated
>> >> installer or if there are technical challenges. At any rate, we have
>> >> many
>> >> users and would like to provide a single platform for OS install and
>> >> were
>> >> able to gently hack the
>> >> /usr/share/foreman/app/models/operatingsystems/solaris.rb file with the
>> >> changes as attached.
>> >>
>> >> Installation media pointing to Solaris 11 AI:
>> >> http://x.x.x.x:/export/auto_install/solaris$major_$minor-i386/
>> >>
>> >> Boot filename:
>> >> /var/lib/tftpboot/pxegrub2
>> >>
>> >> Boot menu:
>> >> /var/lib/tftpboot/boot/grub/grub.cfg (file attached)
>> >>
>> >> Foreman proxy:
>> >> DHCP, TFTP services
>> >>
>> >> After creation of new host, Foreman was able to download the kernel and
>> >> boot_archive from the AI server. At time of install, these steps were
>> >> also
>> >> successful:
>> >>  - get static IP from DHCP
>> >>  - display the grub.cfg boot menu
>> >>  - transfer kernel and boot_archive to new host
>> >>
>> >> Upon completion of transferring kernel and boot_archive, according to
>> >> /var/log/messages, the new host once again request for the IP.
>> >>
>> >> dhcpd: DHCPOFFER on 'static-ip' to 00:00:00:a0:63:75 via ens160
>> >> dhcpd: DHCPREQUEST for 'static-ip' ('foreman proxy ip') from
>> >> 00:00:00:a0:63:75 via ens160
>> >>
>> >> (Scenario 1)
>> >> Even though the Foreman DHCP proxy server has all the relevant
>> >> information
>> >> (ie, static IP, MAC) in /var/lib/dhcpd/dhcpd.leases, this info does not
>> >> get
>> >> passed onto the new host the second time

Re: [foreman-users] Is there a way to update Hosts details after provisioned from AutoProvision using Discovery Plugin?

2017-10-26 Thread Lukas Zapletal
Hello,

autoprovisioning has completely different code flow, the support is not
there yet. It simply ignores all NICs there and leave them untouched.

LZ

On Wed, Oct 25, 2017 at 11:58 PM, No1 <italianjob...@gmail.com> wrote:

> *Hi Lukas,*
>
> *That's really bad news. and I am wondering whether I conveyed my issue or
> not ! The PR that you stated above is basically using  ' unused_ip ' where
> my issue is it is not only out of range for PXE but also a different
> SUBNET. *
>
> *I am only seeing the issue only when I do the "Auto provision / Quick
> Create button "  from the discovered hosts page. However, If provision
> manually, then I don't have any issue. (please see the below screenshot). *
> *Here, I selected the Subnet manually, After I click on the "provision"
> button under the discovered hosts.* *The question is when we can able to
> do that manually, what is the issue that it is preventing to do the same
> thing from the Auto-provision? (pardon me, If I understood it completely
> wrong.!)*
>
>
> <https://lh3.googleusercontent.com/-_2of8Gr-87c/WfEIbZbK70I/AFU/RYYXSq6w6XA38oLSJq4WtjlD68QB9AT4ACLcBGAs/s1600/3.png>
>
>
>
>
> <https://lh3.googleusercontent.com/-0kifxZbRyaI/WfEHx9VlCRI/AFM/WczGZjTR21IxqCjx1SroBxO5mh9wriSewCLcBGAs/s1600/4.png>
>
>
>
>
>
> Thanks.
>
>
>
>
>
>
> On Wednesday, October 25, 2017 at 7:32:50 AM UTC-5, Lukas Zapletal wrote:
>>
>> Hello, you did a great job of explaining what you do. Now, I have some
>> bad news for you - discovery does always keep the IP address which was
>> assigned by DHCP server. It's a bug/feature and it needs to be tackled but
>> we are not there yet. There is a PR pending but it is still some work:
>>
>> https://github.com/theforeman/foreman_discovery/pull/306
>>
>> Despite the PR name, this patch really adds unused_ip call into the
>> workflow which will fix your issue.
>>
>> There is no workaround unfortunately, if you can't wait just grab my
>> patch and get it done if you can. I will definitely not be able to work on
>> this at least this year :-(
>>
>> LZ
>>
>> On Wed, Oct 25, 2017 at 4:36 AM, No1 <italia...@gmail.com> wrote:
>>
>>> *Hi,*
>>>
>>> *I am using Foreman-Discovery Image to discover the server initially
>>> over a PXE network (ex: my network is on 10.7.19.0/24
>>> <http://10.7.19.0/24>). I have no issues in discovering the host into
>>> Foreman over the PXE network.*
>>>
>>>
>>>
>>>
>>> <https://lh3.googleusercontent.com/-_qHsQttz-EI/We_1TS6oduI/AEY/mseBY37GtyQ7dqCfjx6Z1Z4bIZI3UhHDACLcBGAs/s1600/1.png>
>>>
>>>
>>>
>>>
>>> <https://lh3.googleusercontent.com/-SVbT76ElBi8/We_1jbBt1TI/AEc/CvztAeyaZ0QUXQjGjPz_5rZ1EpAdopFWwCLcBGAs/s1600/.png>
>>>
>>>
>>>
>>>
>>>
>>> *Now, I created a host group to deploy an operating system under a
>>> different management subnet (10.7.29.0/24 <http://10.7.29.0/24>) network
>>> which is different from the PXE network (of course!). I am planning to
>>> install ESXi on the discovered hosts. And I expect the host to be deployed
>>> using the subnet that I provided in the HostGroup (which is not true. Maybe
>>> I am assuming in a wrong way!).*
>>>
>>>
>>>
>>>
>>>
>>> <https://lh3.googleusercontent.com/-Vz-7d6tphSg/We_2gpHuKuI/AEo/kcQ4ZCe1iWMnnHeP-A2ITWtRc7VAIrtMwCLcBGAs/s1600/333.png>
>>>
>>>
>>>
>>> *ESXi kick start installation supports a command line parameter to
>>> provide the –vlanid (for the same physical NIC interface.)*
>>>
>>> *And a snippet from my template is as follows:*
>>>
>>>> <% mgmt_ip = ["10.7.29", 
>>>> @host.facts['ipmi_1_ipaddress'].split(".").last].join('.')
>>>> %>
>>>> <% esxi_hostname = [ @host.facts['lldp_neighbor_sys
>>>> name_enp65s0f1'].split("202").first, "c",
>>>> @host.facts['lldp_neighbor_portid_enp65s0f1'].split("/").last].join()
>>>> %>
>>>> <% mgmt_vlan = "104" %>
>>>> <% def_gateway = "10.7.29.1" %>
>>>> vmaccepteula
>>>>
>>>> # Set the root password
>>>> rootpw --iscrypted <%= root_pass %>
>>>>
>>>> # Install ESX
>>>> <%= @host.diskLayout %>
>>>> <% subnet = @host.s

Re: [foreman-users] Re: WebSock error: [object Event]

2017-10-26 Thread Lukas Zapletal
Please read:

https://theforeman.org/manuals/1.15/index.html#7.1NoVNC

and follow the instructions there.

LZ

On Thu, Oct 26, 2017 at 7:04 AM, Subramaniyan .R <subup...@gmail.com> wrote:
> i have used libvirt,
>
> On Wednesday, 25 October 2017 19:14:34 UTC+5:30, Lukas Zapletal wrote:
>>
>> What compute resource is it? This will only work with libvirt and
>> oVirt/RHEV I believe.
>>
>> LZ
>>
>> On Tue, Oct 24, 2017 at 8:28 AM, Subramaniyan .R <subu...@gmail.com>
>> wrote:
>> > Hi All,
>> >Can any one help me on this below error ?   "WebSock error: [object
>> > Event]" error.
>> >
>> >
>> > 2017-10-24 11:54:18 efa2e55c [app] [D] Starting VNC Proxy:
>> > /usr/share/foreman/extras/noVNC/websockify.py --daemon
>> > --idle-timeout=120
>> > --timeout=120 5913 kvm.radisys.com:5907 --cert
>> > /etc/puppetlabs/puppet/ssl/certs/certnew.pem --key
>> > /etc/puppetlabs/puppet/ssl/private_keys/my-private-key.pem
>> > 2017-10-24 11:54:18 efa2e55c [app] [D] [WARNING: no 'numpy' module, HyBi
>> > protocol will be slower
>> >  |
>> > 2017-10-24 11:54:18 efa2e55c [app] [D] VNCProxy Error: WebSocket server
>> > settings:
>> >  |
>> > 2017-10-24 11:54:18 efa2e55c [app] [D] VNCProxy Error:   - Listen on
>> > :5913
>> >  |
>> > 2017-10-24 11:54:18 efa2e55c [app] [D] VNCProxy Error:   - Flash
>> > security
>> > policy server
>> >  |
>> > 2017-10-24 11:54:18 efa2e55c [app] [D] VNCProxy Error:   - SSL/TLS
>> > support
>> >  |
>> > 2017-10-24 11:54:18 efa2e55c [app] [D] VNCProxy Error:   - Backgrounding
>> > (daemon)
>> >
>> >
>> > Regards,
>> > Subramaniyan.R
>> >
>> >
>> > On Wednesday, 11 June 2014 17:26:16 UTC+5:30, Jorick Astrego wrote:
>> >>
>> >> Hi,
>> >>
>> >> After hooking up a libvirt server to foreman I'm unable to access the
>> >> VNC console. I already checked everything from
>> >> http://theforeman.org/manuals/1.5/index.html#7.1NoVNC but I still get
>> >> the "WebSock error: [object Event]" error.
>> >>
>> >> I've set "network.websocket.allowInsecureFromHTTPS" to true on
>> >> firefox-29.0.1-1.fc20.x86_64 and telnet to the vnc port is working from
>> >> both my workstation and the foreman server. Also there is a
>> >> websocket.py
>> >> running and the port is connectable with telnet.
>> >>
>> >> I cannot test chrome because the "Allow insecure WebSocket from https
>> >> origin" option is not available in chromium 34 which is the latest I
>> >> get
>> >> from a repo.
>> >>
>> >> Also tried it on a windows 7 machine with chrome with the same error.
>> >>
>> >> Anything else I can do to debug?
>> >>
>> >> Kind regards,
>> >>
>> >> Jorick Astrego
>> >> Netbulae B.V.
>> >>
>> > --
>> > 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-user...@googlegroups.com.
>> > To post to this group, send email to forema...@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/foreman-users.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Later,
>>   Lukas @lzap Zapletal
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Discovery iso: Missing EFI file (/boot/efi/EFI/*/gcdx64.efi)

2017-10-25 Thread Lukas Zapletal
Worked for me on Fedora, do a PR and I can add those files into the
official build.

LZ

On Wed, Oct 25, 2017 at 4:16 PM, Lukas Zapletal <l...@redhat.com> wrote:
> Hello, we do only build on Fedora, the livecd tooling in RHEL7 might
> be little bit outdated.
>
> What is the reason for shim/efibootloader in discovery image? You want
> SecureBoot over PXE?
>
> LZ
>
> On Sun, Oct 22, 2017 at 3:11 PM, Oleg Mcnoleg <stockford...@gmail.com> wrote:
>> Hello,
>>
>> I'm rolling my own discovery iso but UEFI support seems to fail during
>> build.
>>
>> Building on a CentOS 7.2 host running build-livecd then build-livecd. The
>> ISO builds OK and is bootable from legacy BIOS but I need to boot UEFI hosts
>> too.
>>
>> I have the below in my 20-packages.ks
>>
>> grub2-efi
>> efibootmgr
>> shim
>>
>>  Missing EFI file (/boot/efi/EFI/*/gcdx64.efi)
>>  Failed to copy EFI files, no EFI Support will be included.
>>  usage: mkefiboot [-h] [--debug] [-d] [-a] [-l LABEL] [-i ICONFILE]
>>   [-n DISKNAME] [-p PRODUCT]
>>   EFIBOOTDIR OUTPUTFILE
>>  mkefiboot: error: /tmp/imgcreate-1xfrZU/iso-E4oXxM/EFI/BOOT is not a
>> directory
>>  usage: mkefiboot [-h] [--debug] [-d] [-a] [-l LABEL] [-i ICONFILE]
>>   [-n DISKNAME] [-p PRODUCT]
>>   EFIBOOTDIR OUTPUTFILE
>>  mkefiboot: error: /tmp/imgcreate-1xfrZU/iso-E4oXxM/EFI/BOOT is not a
>> directory
>>   * ensure /etc/os-release is present (needed for RHEL 7.0)
>>
>> What am I missing here? Any help would be appreciated.
>>
>> Thanks,
>>
>>
>> --
>> 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.
>
>
>
> --
> Later,
>   Lukas @lzap Zapletal



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Discovery iso: Missing EFI file (/boot/efi/EFI/*/gcdx64.efi)

2017-10-25 Thread Lukas Zapletal
Hello, we do only build on Fedora, the livecd tooling in RHEL7 might
be little bit outdated.

What is the reason for shim/efibootloader in discovery image? You want
SecureBoot over PXE?

LZ

On Sun, Oct 22, 2017 at 3:11 PM, Oleg Mcnoleg  wrote:
> Hello,
>
> I'm rolling my own discovery iso but UEFI support seems to fail during
> build.
>
> Building on a CentOS 7.2 host running build-livecd then build-livecd. The
> ISO builds OK and is bootable from legacy BIOS but I need to boot UEFI hosts
> too.
>
> I have the below in my 20-packages.ks
>
> grub2-efi
> efibootmgr
> shim
>
>  Missing EFI file (/boot/efi/EFI/*/gcdx64.efi)
>  Failed to copy EFI files, no EFI Support will be included.
>  usage: mkefiboot [-h] [--debug] [-d] [-a] [-l LABEL] [-i ICONFILE]
>   [-n DISKNAME] [-p PRODUCT]
>   EFIBOOTDIR OUTPUTFILE
>  mkefiboot: error: /tmp/imgcreate-1xfrZU/iso-E4oXxM/EFI/BOOT is not a
> directory
>  usage: mkefiboot [-h] [--debug] [-d] [-a] [-l LABEL] [-i ICONFILE]
>   [-n DISKNAME] [-p PRODUCT]
>   EFIBOOTDIR OUTPUTFILE
>  mkefiboot: error: /tmp/imgcreate-1xfrZU/iso-E4oXxM/EFI/BOOT is not a
> directory
>   * ensure /etc/os-release is present (needed for RHEL 7.0)
>
> What am I missing here? Any help would be appreciated.
>
> Thanks,
>
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Lots of "Mysql2::Error: Deadlock found when trying to get lock" under increased load

2017-10-25 Thread Lukas Zapletal
Hmm is this Debian? Should work.

LLZ

On Tue, Oct 24, 2017 at 2:50 AM, 'Konstantin Orekhov' via Foreman
users  wrote:
>
>> OK, thanks, Lukas! As soon as I get that duplicate entries show up again,
>> I'll run above and provide a result here. After patching for MySQL query
>> issue, I don't see this happening very often (which is a good thing).
>
>
> Hmm, I've got 2 duplicates, but I can't seem to run what you asked for:
>
> [root@spc02 foreman]# pwd
> /usr/share/foreman
>
> [root@spc02 foreman]# rake --trace console
> rake aborted!
> cannot load such file -- apipie/middleware/checksum_in_headers
> /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
> /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
> /usr/share/foreman/config/application.rb:5:in `'
> /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
> /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
> /usr/share/foreman/Rakefile:1:in `'
> /usr/share/gems/gems/rake-0.9.6/lib/rake/rake_module.rb:25:in `load'
> /usr/share/gems/gems/rake-0.9.6/lib/rake/rake_module.rb:25:in
> `load_rakefile'
> /usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:604:in
> `raw_load_rakefile'
> /usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:89:in `block in
> load_rakefile'
> /usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:160:in
> `standard_exception_handling'
> /usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:88:in
> `load_rakefile'
> /usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:72:in `block in run'
> /usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:160:in
> `standard_exception_handling'
> /usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:70:in `run'
> /usr/bin/rake:37:in `'
> [root@spc02 foreman]#
>
> What am I missing here?
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Re: Foreman - Solaris 11 install

2017-10-25 Thread Lukas Zapletal
Hey Trisha,

the error smells like a name resolution error, have you checked  DNS?
Does the DHCP server provide correct DNS info, so the system can
resolve installation media or other services involved in provisioning?

Now, the DHCP is really expected to just work. Are you using the ISC
DHCP deployed by our installer, or some different configuration? I
assume that by "static IP from DHCP" you mean "IP address
reservation".

Since the initial DHCP request was done by preboot environment and
second is done by Solaris, I bet there is a bug in network driver. Are
you using correct driver? Can you swap it out for some different card?

I am not sure I get your scenario 2. That looks like some DHCP client
miscommunication.

On Tue, Oct 24, 2017 at 7:10 PM, Trisha Hoang  wrote:
> The installation fails and ends with this error message.
>
> auditd[130]: getaddrinfo() failed[node name or service name not known].
> auditd[130]: adt_get_local_address failed, no Audit IP address available,
> faking loopback for   and error Network is  down.
>
>
> On Tuesday, October 24, 2017 at 2:49:00 AM UTC-7, Trisha Hoang wrote:
>>
>> Hello Foreman users,
>>
>> From my understanding, there is no support for Solaris 11 install on
>> Foreman. Not sure if the reason is that Solaris 11 has its own automated
>> installer or if there are technical challenges. At any rate, we have many
>> users and would like to provide a single platform for OS install and were
>> able to gently hack the
>> /usr/share/foreman/app/models/operatingsystems/solaris.rb file with the
>> changes as attached.
>>
>> Installation media pointing to Solaris 11 AI:
>> http://x.x.x.x:/export/auto_install/solaris$major_$minor-i386/
>>
>> Boot filename:
>> /var/lib/tftpboot/pxegrub2
>>
>> Boot menu:
>> /var/lib/tftpboot/boot/grub/grub.cfg (file attached)
>>
>> Foreman proxy:
>> DHCP, TFTP services
>>
>> After creation of new host, Foreman was able to download the kernel and
>> boot_archive from the AI server. At time of install, these steps were also
>> successful:
>>  - get static IP from DHCP
>>  - display the grub.cfg boot menu
>>  - transfer kernel and boot_archive to new host
>>
>> Upon completion of transferring kernel and boot_archive, according to
>> /var/log/messages, the new host once again request for the IP.
>>
>> dhcpd: DHCPOFFER on 'static-ip' to 00:00:00:a0:63:75 via ens160
>> dhcpd: DHCPREQUEST for 'static-ip' ('foreman proxy ip') from
>> 00:00:00:a0:63:75 via ens160
>>
>> (Scenario 1)
>> Even though the Foreman DHCP proxy server has all the relevant information
>> (ie, static IP, MAC) in /var/lib/dhcpd/dhcpd.leases, this info does not get
>> passed onto the new host the second time. Without obtaining an IP, the
>> install failed.
>>
>> (Scenario 2)
>> In another scenario, we have an external DHCP server (not Foreman proxy
>> server), the new host gets its static IP the second time and the install
>> succeeds.
>>
>> It's understandable that it would be difficult to reproduce these
>> scenarios as many pieces are involved, but any help is greatly appreciated
>> as I have run out of ideas.
>>
>> Thank you.
>> Trisha
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Re: Accessing Katello Repos on another Katello Server

2017-10-17 Thread Lukas Zapletal
Yep, you can also set them to be published via HTTP only (no
certificate needed).

LZ

On Mon, Oct 16, 2017 at 10:05 PM, Jasper Connery  wrote:
> Looks like it is possible. Initially ran into problems due to cross-domain
> issues, but I have now got it working.
>
> Assigned the published URL (for the repo in question) from the main Katello
> server as the yum repo URL on our test Katello server, and this has worked a
> treat.
>
>
>
> On Monday, October 16, 2017 at 2:20:06 PM UTC+13, Jasper Connery wrote:
>>
>> Hello,
>>
>> We currently have two separate Katello servers in our environment, a test
>> and a production server. On one server we have a local repository for
>> in-house packages.
>>
>> Is it possible to have the test katello server access the prod katello
>> repo's URL to pull those packages down?
>>
>> Cheers,
>>
>> Jasper
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] How to customize the facts from the Foreman discovery Image / use them in provisioning templates?

2017-10-17 Thread Lukas Zapletal
Autoprovisioning rule lets you use ERB to construct hostname.

Normal provisioning does not. You can however change fact that
construct the name. You can create FDI extension (ZIP FILE) which will
be downloaded during discovery, that can add any fact you want using
Facter API.

All facts are available during provisioning in latest stable version
1.15 until first fact report comes in. Then they are deleted.

Everything is in our doc, please do read it.

LZ

On Mon, Oct 16, 2017 at 10:52 PM, No1  wrote:
> Hi,
>
> Is there any way to customize the facts that are being received from the FDI
> image?
>
> We would like to have the host name to follow a pattern. For example, If I
> have lldp_neighbor_sysname_p2p1: r12c1t1 and  lldp_neighbor_portid_p2p1:
> 1/16 then we would like to have the host name as : r12c116, would this be
> possible? If so how do we do it?
>
> The other thing is how can we send the information of these facts to the
> kick start templates?
>
> Please suggest any ideas?
>
> Thanks,
> No1
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Foreman SmartProxy - Standalone usage

2017-10-16 Thread Lukas Zapletal
Absolutely, the API is not much documented, it is a Sinatra App so
just read the code.

LZ

On Mon, Oct 16, 2017 at 4:09 PM, xakraz  wrote:
> Hello,
>
>
> I have a question regarding the usage of Foreman SmartProxies as standalone
> pieces without TheForeman.
>
> We have a setup where we are using Tumblr Collins
> http://tumblr.github.io/collins/index.html as our main CMDB and bare metal
> node life cycle manager.
> We are looking for integrating a bit more Collins and the rest of the
> infrastructure. We would like to use ForemanSmartProxies (especially DNS and
> DHCP ones) through their HTTP REST APIs but without the main Foreman app.
>
> Would it be possible ?
>
>
> Thank you all for your answers :)
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Discovered hosts using Discovery Plugin

2017-10-16 Thread Lukas Zapletal
It is possible, read the manual.

LZ

On Fri, Oct 13, 2017 at 7:01 PM, No1  wrote:

> Hi,
>
> Is there way to alter the look/ columns that are being displayed under the
> discovered hosts?
>
> Currently, it shows the Names with Mac address of the PXE NiC Interface
> with No IPMI IP. This would give no information to me as I don't have any
> way to verify which is being absent in the foreman. going with the NIC
> interface MAC address is okay, but that would be difficult to look through
> all the servers and identify which one failed to load the FDI image/ report
> back to foreman.
>
> It would be  nice to list the IPMI IP address or any other custom fact
> like *"LL**dp_neighbor_sysname" or some other custom fact*?.
>
> *Is it really possible to customize the columns that are being displayed
> under the Discovered Hosts page?*
>
>
>
> 
>
> Thanks,
> No1.
>
> --
> 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.
>



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Lots of "Mysql2::Error: Deadlock found when trying to get lock" under increased load

2017-10-13 Thread Lukas Zapletal
Ideally I would like to see DEBUG and SQL logs for that transactions, but
thats flooding your production server.

In the console with both records presnet do something like:

::Nic::Managed.where(:mac => "MA:CA:DDRESS::", :primary => true)

On Wed, Oct 11, 2017 at 9:08 PM, 'Konstantin Orekhov' via Foreman users <
foreman-users@googlegroups.com> wrote:

>
>
>> Theoretically if you changed configuration of bootif fact in settings,
>> this could happen. But I assume you haven't. Was it also the same FDI
>> version, just in case facter changed facts?
>>
>
> Yes, the same system with the same discovery proxy. I'm not using official
> FDI, but a netbooted Ubuntu14.04 (Casper-based) with old foreman-proxy
> version 1.9.2, smart_proxy_discovery_image-1.0.5.gem and discover-host
> from around the same time. I had trouble bringing in later versions of
> foreman-proxy to u14.04 because of dependency on ruby 2.x. If the fact that
> I run such old versions on a client side is an issue in your opinion, I can
> start the work on migrating to u16.04. But so far I have not seen an
> indication that this is an issue - duplicate entries happen not too often
> and most of the time it is working fine (and I have several thousands of
> hosts going through this), especially now with that MySQL patch you gave me
> earlier.
>
>
>> If you visit the original discovery host in the UI, do you see
>> Interfaces list? What MAC address is there? Is it detected as the
>> primary interface there?
>>
>
> Yes, all of the data is in place for both duplicate entries and look
> absolutely identical to me:
>
>
> 
>
>
> 
>
>
>
>> Do you still have both records in the DB? Can you run rake console and
>> try these statements? Or insert Rails.logger.info statements there to
>> see the code flow.
>>
>
> I do still have those in a DB, yes. But I don't have that host running a
> discover proxy anymore :(
> But if I find more duplicate entries, I don't quite understand what you
> want me to do - try which statements? Or insert logger statements where
> exactly?
>
>
> --
> 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.
>



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] How to blacklist certain interfaces from being imported

2017-10-13 Thread Lukas Zapletal
Hello,

every puppet or rhsm fact update will add all missing NICs but never
delete existings. You can turn off this behavior, it's a global
setting not sure how its named but it will prevent from any NIC to be
created by facts.

LZ

On Thu, Oct 12, 2017 at 1:32 PM, 'Christian Schulze-Wiehenbrauk' via
Foreman users  wrote:
> Hi,
>
> we run a foreman installation with katello to provision our openstack
> environment. Openstack has the side effect to create a vast amount of
> interfaces and bridges on the compute nodes, which then will be imported
> into foreman. I'm looking for a way to want to avoid this.
> I tried to configure this with foreman-rake.  This setting is now:
>
> foreman-rake -- config -k ignored_interface_identifiers
> ["lo","usb*","vnet*","macvtap*","_vdsmdummy_","veth*","docker*","br-*","tap*","qbr*","qvb*","qvo*","qr-*","qg-*","vlinuxbr*","vovsbr*","vxlan*","ovs-*"]
>
> This does not help unfortunately. So I would appreciate if someone could
> explain the workflow of how foreman creates the interfaces to me.
> What I mean, is that I don't understand under which circumstance foreman
> creates a new entry for an interfaces for a host in the database. Does this
> happen only if facts are imported, are only new facts considered or are
> older facts merged?
>
> Thanks
> Christian
>
>
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Re: TFTP is not working with the foreman after installed discovery plugin

2017-10-13 Thread Lukas Zapletal
This patch I am working on will make this much easier!

https://github.com/theforeman/foreman/pull/4891

On Fri, Oct 13, 2017 at 4:53 AM, No1  wrote:
> The Issue is resolved.
>
> But It would be nice not to touch the custom configs that were made into the
> TFTP and DHCP config files before the installation of discovery plugin using
> foreman-installation.
>
>
> On Thursday, October 12, 2017 at 2:41:29 PM UTC-5, No1 wrote:
>>
>> Hi,
>>
>> I am testing foreman poc and it was working fine till now. I installed
>> foreman-discovery plugin using foreman-installer. As mentioned in the
>> document, it removed all my configurations dhcp, tftp and all other
>> foreman-settings.
>>
>>> 2.1.1 Installer (recommended)
>>> As of Foreman 1.8+, the foreman-installer is able to automatically
>>> install the package and proceed with all necessary steps. To do this, re-run
>>> the installer with the following option:
>>> # foreman-installer --enable-foreman-plugin-discovery
>>> Important note: Executing foreman-installer will re-deploy all
>>> foreman-related configuration files. In case some changes have been made,
>>> proceed with manual download described below.
>>
>>
>> 1.  Is this an intended behavior?  I mean it would be really difficult to
>> reconfigure all the settings in all the files is eating up all the time. a
>>
>> 2.  I made somehow my TFTP to work by tweaking all the settings ( before
>> installing foreman-discovery plugin). Now, I don't remember all the places
>> where I made the changes as the plugin installation reverted all my changes
>> to the default? Is there any way to make my TFTP working again?
>>
>> Please pardon me If I am not making any sense as I am completely new to
>> the foreman stuff.
>>
>> Thanks in Advance.
>> No1.
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Discovery plugin removes DHCP feature?

2017-10-11 Thread Lukas Zapletal
We have recently rewritten the DHCP conf parser and it looks like a
parser error. Please file a bug on smart-proxy component DHCP and if
possible include the configuration (dhcpd.conf and all included files
from there).

LZ

On Wed, Oct 11, 2017 at 4:53 PM, Charlie Baum <charlieb...@gmail.com> wrote:
> Proxy.log is showing this:
>
> Disabling all modules in the group ['dhcp'] due to a failure in one of them:
> (): did not find expected key while parsing a block mapping at line
> 4 column 1
>
>
> Not sure how to track that one down.
>
> On Wednesday, October 11, 2017 at 4:47:07 AM UTC-4, Lukas Zapletal wrote:
>>
>> No, something happened to DHCP module, check proxy.log and look into
>> initialization phase.
>>
>> Typically, when you perform upgrade of dhcp or tftp daemons (via
>> yum/apt), they will reset permissions on some files or directories
>> which will cause DHCP module to fail to init. This will fix it:
>>
>> setfacl -R -m u:foreman-proxy:rwx /etc/dhcp/ /var/lib/dhcpd/
>> /var/lib/tftpboot
>>
>> I think our develop branch installer will do this already so this
>> mis-behavior will disappear in 1.16+.
>>
>> LZ
>>
>> On Wed, Oct 11, 2017 at 3:19 AM, Charlie Baum <charl...@gmail.com> wrote:
>> > Running through a foreman POC and playing with discovery.  I went
>> > through
>> > the install/config docs for enabled discovery on the smart proxy.  When
>> > I
>> > refreshed the smart proxy, Discovery appeared but DHCP disappeared from
>> > the
>> > feature list.  Is this expected?
>> >
>> > --
>> > 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-user...@googlegroups.com.
>> > To post to this group, send email to forema...@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/foreman-users.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Later,
>>   Lukas @lzap Zapletal
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Foreman Discovery. Name of discovered hosts

2017-10-11 Thread Lukas Zapletal
https://www.theforeman.org/plugins/foreman_discovery/

It is all there. LZ

On Wed, Oct 11, 2017 at 6:40 PM, Conor Mc Garvey  wrote:
> Hey,
>
> I'm looking to change the name of the discovered host to something more
> recognisable.
>
> For the name I plan to combine the MAC with another fact (lldp port
> description).
>
> Where in the foreman discovery code does the discovered host name get sent
> to foreman?
>
> Thanks
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Foreman bootdisk and external DHCP

2017-10-11 Thread Lukas Zapletal
Hello,

I have zero experience with Ubuntu/Debian preseed but you need to
identify exactly at which stage you loose IP connection. My bet would
be when the installer attempts to reconfigure network? Perhaps there
is some log on virtual console 2 or higher where you can see this.

FYI Preseed default finish (or any "finish" template kind) is only
used in cloud environment. In PXE it won't be used I think. At least
in Red Hat OS (there is post scriplet in kickstart for this).

Now, I can comment only on Red Hats since this is my primary OS. We
ship the default kickstart configured in a way that if the subnet
associated with the host is set to DHCP mode, it will configure the
primary device for DHCP. Otherwise, it will do static configuration. I
assume it's the same for Debians. For docs about kickstart you can go
to: http://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#network
(or RHEL docs as well for enterprise versions).

Now it is important to understand that "network" kickstart option
re-configures network, but for PXE installations network needs to be
pre-initialized before Anaconda loads up. This is done by init ram
disk via kernel command line options. Again, by default we configure
DHCP or Static according to subnet setting. You can see this in
PXELinux template when doing PXE. For iPXE you can see this in iPXE
template ("Preseed default iPXE"). As you can see, iPXE IP address,
gateway and DNS is passed into the installer which will re-use these
to start Linux network stack.

So there are two phases, in your case the 2nd one perhaps fails. Check
your "Preseed default" template Preview option to see it.

Again, I suggest you to set things up without Foreman first to
understand how things work. I won't be able to help from screenshots,
I don't do Ubuntu provisioning much.



On Wed, Oct 11, 2017 at 1:13 PM, Craig Parker  wrote:
> Hi Lukas, and thanks so much for your reply.  I really appreciate the time 
> and effort you put into this.
>
> Unfortunately I've been really busy with operational tasks today and haven't 
> had any time to devote to this at all. What's happening though is this:
>
> - I boot the target machine (currently just an Ubuntu VM) with the generic 
> bootdisk option
> - The machine boots, gets an IP address off our existing DHCP infrastructure, 
> and contacts Foreman to look for a machine configured with its MAC
> - The machine finds a corresponding MAC address registered in Foreman, and 
> proceeds to build via the templates outlined at the GitHub bootdisk page:
> "Preseed default iPXE",
> "Preseed default", and
> "Preseed default finish"
>
> I haven't modified any of these templates at this stage while I try to 
> understand the process.
> At some stage fairly early on in the build though, it seems I lose my IP 
> address, and the build subsequently fails, as it can't download any required 
> files.  By this stage I can't find my VM on the network anymore either.
>
> I hope I've explained this ok. Does this make sense?
>
> Thanks for your comments regarding setting a DHCP option inside the preseed 
> or kickstart file.  I suspect that's all I may need to do perhaps. Sorry for 
> the possibly stupid question, but would you be able to give me any guidance 
> on how to set DHCP inside the preseed file (which one?) and / or inside the 
> RHEL kickstart file in Foreman?
>
> I should have a bit more time for this tomorrow and am more than happy to 
> provide screenshots / error messages / log files as necessary - I just don't 
> want to bomb you right now with potentially unnecessary extra stuff.
>
> Thanks again for your help, Craig
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Lots of "Mysql2::Error: Deadlock found when trying to get lock" under increased load

2017-10-11 Thread Lukas Zapletal
Oh now I understand, looks like a new bug. I am not able to reproduce
with FDI 3.4.1 and develop Foreman. The code responsible for finding
existing record is here:

https://github.com/theforeman/foreman_discovery/blob/develop/app/models/host/discovered.rb#L53-L62

Theoretically if you changed configuration of bootif fact in settings,
this could happen. But I assume you haven't. Was it also the same FDI
version, just in case facter changed facts?

If you visit the original discovery host in the UI, do you see
Interfaces list? What MAC address is there? Is it detected as the
primary interface there?

Do you still have both records in the DB? Can you run rake console and
try these statements? Or insert Rails.logger.info statements there to
see the code flow.

On Tue, Oct 10, 2017 at 8:01 PM, 'Konstantin Orekhov' via Foreman
users  wrote:
>
>>
>> Name has already been taken - this usually means that host (either
>> discovered or managed or unmanaged) of that name "macX" already
>> exist. Same mac address? You can change easily how discovered hosts are
>> being named, by default it is "mac" + MAC address, you can change that to
>> random number or any different fact you want. See settings and our
>> documentation. Try to add a random number at the end if that helps.
>
>
> Well, no, that's the same host. It was discovered at some point back (8 days
> ago as you can see in the screenshot above). Then it got rebooted/crashed,
> PXE-booted again and started sending its discovery payload again, but gets
> 422. Usually, if it is the same host, Foreman just updates existing entry
> with new facts, or at least, the time of last report. But in the case above,
> that did not happen as for some reason Foreman created another record in a
> DB (with a different ID) for the same host. Unless I remove both of the
> records, 422s will continue to happen. I was hoping that a gist I provided
> gives you enough info on what could have caused that double-record situation
> for the same host.
>
> Here are my DB entries for the above host:
>
> [root@spc03 ~]# mysql -u foreman -p$DB_PASS foreman -e "SELECT * from hosts
> where type = 'Host::Discovered' and NAME = 'mac90e2baea5d58'\G;"
> *** 1. row ***
>   id: 446735
> name: mac90e2baea5d58
> last_compile: NULL
>  last_report: 2017-10-02 05:49:35
>   updated_at: 2017-10-02 05:49:46
>   created_at: 2017-09-15 22:44:42
>root_pass: NULL
>  architecture_id: NULL
>   operatingsystem_id: NULL
>   environment_id: NULL
>ptable_id: NULL
>medium_id: NULL
>build: 0
>  comment: NULL
> disk: NULL
> installed_at: NULL
> model_id: 6
> hostgroup_id: NULL
> owner_id: 10
>   owner_type: User
>  enabled: 1
>   puppet_ca_proxy_id: NULL
>  managed: 0
>use_image: NULL
>   image_file: NULL
> uuid: NULL
>  compute_resource_id: NULL
>  puppet_proxy_id: NULL
> certname: NULL
> image_id: NULL
>  organization_id: NULL
>  location_id: NULL
> type: Host::Discovered
>  otp: NULL
> realm_id: NULL
>   compute_profile_id: NULL
> provision_method: NULL
>grub_pass:
>global_status: 0
> lookup_value_matcher: NULL
>discovery_rule_id: NULL
>salt_proxy_id: NULL
>  salt_environment_id: NULL
>   pxe_loader: NULL
> *** 2. row ***
>   id: 456978
> name: mac90e2baea5d58
> last_compile: NULL
>  last_report: 2017-10-10 16:04:20
>   updated_at: 2017-10-10 16:04:20
>   created_at: 2017-10-07 07:13:19
>root_pass: NULL
>  architecture_id: NULL
>   operatingsystem_id: NULL
>   environment_id: NULL
>ptable_id: NULL
>medium_id: NULL
>build: 0
>  comment: NULL
> disk: NULL
> installed_at: NULL
> model_id: NULL
> hostgroup_id: NULL
> owner_id: NULL
>   owner_type: NULL
>  enabled: 1
>   puppet_ca_proxy_id: NULL
>  managed: 0
>use_image: NULL
>   image_file: NULL
> uuid: NULL
>  compute_resource_id: NULL
>  puppet_proxy_id: NULL
> certname: NULL
> image_id: NULL
>  organization_id: NULL
>  location_id: NULL
> type: Host::Discovered
>  otp: NULL
> realm_id: NULL
>   compute_profile_id: NULL
> provision_method: NULL
>grub_pass:
>global_status: 0
> lookup_value_matcher: NULL
>discovery_rule_id: NULL
>salt_proxy_id: NULL
>  salt_environment_id: NULL
>

Re: [foreman-users] Discovery plugin removes DHCP feature?

2017-10-11 Thread Lukas Zapletal
No, something happened to DHCP module, check proxy.log and look into
initialization phase.

Typically, when you perform upgrade of dhcp or tftp daemons (via
yum/apt), they will reset permissions on some files or directories
which will cause DHCP module to fail to init. This will fix it:

setfacl -R -m u:foreman-proxy:rwx /etc/dhcp/ /var/lib/dhcpd/ /var/lib/tftpboot

I think our develop branch installer will do this already so this
mis-behavior will disappear in 1.16+.

LZ

On Wed, Oct 11, 2017 at 3:19 AM, Charlie Baum  wrote:
> Running through a foreman POC and playing with discovery.  I went through
> the install/config docs for enabled discovery on the smart proxy.  When I
> refreshed the smart proxy, Discovery appeared but DHCP disappeared from the
> feature list.  Is this expected?
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Foreman bootdisk and external DHCP

2017-10-10 Thread Lukas Zapletal
Hey Craig and welcome here.

Can you explain what happens in more detail? At which point you seem
to lost IP address? You say you hit kickstart that would mean Anaconda
was loaded up and initialized network, at this point there is almost
nothing which could literally stop Anaconda from completing
installation, except some misconfiguration in the kickstart itself.

Also which bootdisk type do you use? These are very different
workflows. Generic (and subnet) bootdisks match the host you want to
provision with MAC address. But host or full host disk uses token
which is tied to host you created bootdisk for. The token has limited
expiration time (by default 90 minutes I think), then the bootdisk is
invalid. You can turn of token_duration in settings, in that case
Foreman will try to match hosts via REMOTE_IP (which will not work if
your IP address is not correct in foreman db) or for Anaconda (Red Hat
systems only) it will match according to MAC address sent by anaconda
in HTTP header.

Better understanding will give you generic and host snippets which are
used to generate /SCRIPT file for iPXE:

https://github.com/theforeman/foreman_bootdisk/blob/master/app/views/foreman_bootdisk/generic_host.erb
https://github.com/theforeman/foreman_bootdisk/blob/master/app/views/foreman_bootdisk/host.erb

For full host disk PXELinux template is used. Remember you can edit
any of these in Foreman, feel free to modify iPXE as you want. If you
don't want static allocation, you can just put DHCP statement there
and iPXE will chainboot from Foreman iPXE template using DHCP. The
same way you can modify PXELinux template which is by default DHCP
(but when Subnet is put into Static mode it will also use static
configuration).

In all cases, I recommend to setup this without foreman first and then
after full understanding how you want piece things together you can
modify templates like you want.

Good luck!

On Tue, Oct 10, 2017 at 9:15 AM, Craig Parker  wrote:
> Hi everybody, and thanks Foreman people for a wonderful piece of kit. I've 
> been using it successfully for a little while, and am now trying to sort out 
> provisioning here at work to save us some time.
>
> We are predominantly a Windows environment however, and in particular our 
> DHCP servers are windows boxes that I have no control over.  PXE is in use 
> exclusively for our Windows imaging.
>
> Given that, I though that the foreman_bootdisk plugin would be the answer, 
> and I'm really close to getting it all working, but any machine I try to 
> provision has network issues and fails the build. I boot via the generic boot 
> disk and the machine starts, gets an IP address and contacts The Foreman for 
> build instructions (preseed, kickstart etc). After that it seems that the 
> machine loses its IP address and subsequently fails to go any further.
>
> I think the piece I'm missing is how to make The Foreman bootdisk scenario 
> work with an external DHCP server.  I had thought I could just boot via the 
> bootdisk and let the existing DHCP take care of the network piece, and this 
> is exactly how I build RHEL boxes here from Satellite 5.x, but I think I've 
> missed some config or I'm not understanding how Foreman works with external 
> non-controlled DHCP.
>
> Apologies for the long post. Can anyone offer any guidance on how to make 
> Foreman bootdisk and external DHCP work? More than happy to provide any 
> details or logs that could be of use.
>
> Many thanks, Craig.
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Lots of "Mysql2::Error: Deadlock found when trying to get lock" under increased load

2017-10-10 Thread Lukas Zapletal
Hey

I did not see any 422 error before this transaction so I think this is it.
> Although I did not see any long MySQL queries, the whole transaction still
> took ~11 seconds to complete for some reason:
>

Name has already been taken - this usually means that host (either
discovered or managed or unmanaged) of that name "macX" already
exist. Same mac address? You can change easily how discovered hosts are
being named, by default it is "mac" + MAC address, you can change that to
random number or any different fact you want. See settings and our
documentation. Try to add a random number at the end if that helps.


>
>
>> For smart proxy, there was a patch done by Dmitri who redesigned DHCP
>> parser, it's much more capable and faster now. I think this landed in
>> 1.16 RC1, yeah: http://projects.theforeman.org/issues/19441
>> 
>> (https://github.com/theforeman/smart-proxy/commit/21813c6cde
>> 0d2be10747682f1a001a7c0bd3ffb9)
>>
>
> From my side, any performance improvements for DHCP SmP is always a
> welcomed change :)
>
>
>> I did not hear about unresponsive smart-proxy processes, can you check
>> system limits (open handles etc)? SELinux? Firewall. Any proxy plugins
>> enable? Then file a redmine bug, haven't seen that.
>>
>
> That's the problem - no smoking gun that I could find. No system resource
> shortages logged, system itself is a rather beefy VM that does not even
> sweat, no firewalls, selinux set to permissive mode. I only run 3 SmP -
> bmc, dhcp and tftp.
> On top of that, since I can't replicate this at will, I have to wait until
> this issue manifests itself naturally.
>
> And just to make it clear - it is not that SmP process becomes completely
> unresponsive, but only an API-facing part. That's why I'm wondering if
> moving away from Webrick to Apache or Nginx with Passenger is a possibility.
>

Proxy is a regular Sinatra app, so any Rack servere should do the trick
(Puma perhaps). I'd try that to see if it helps. Might be bug in Webrick,
try to downgrade or upgrade it.

Another question along the same lines - is it possible to run each of the
> smart-proxies as a separate processes (listening on different ports)
> instead of one with several proxies and single port. For example, in this
> particular situation even if one SmP was having an issue, it would not
> affect the other 2, also it would also pinpoint the troubled proxy
> simplifying troubleshooting efforts.
>

We don't support that, unfortunately.

-- 
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] Foreman + Isc DHCP

2017-10-09 Thread Lukas Zapletal
We do support one subnet per installation via installer/puppet and
multiple subnets via hiera.yaml.

LZ

On Fri, Oct 6, 2017 at 5:42 AM, Grace Thompson <barfingca...@gmail.com> wrote:
> Any plans on enabling Subnet creations?
>
> - gracie mobile
>
>> On Sep 24, 2017, at 11:35 PM, Lukas Zapletal <l...@redhat.com> wrote:
>>
>> Hello,
>>
>> this page is pretty out of date (2013), you are not supposed to be
>> installing these services manually, we have a puppet-based installer
>> that does all the magic. If you do not want to use it, I recommend you
>> to install foreman on a test server and then investigate the
>> configuration files contents because your approach will be painful I
>> think.
>>
>> Anyway, Foreman does manage DHCP records using OMAPI (adding/removing
>> records, tracking leases) but it does NOT create subnets. You need to
>> do this manually, our installer can create one subnet for you (it
>> requires it actually) and more subnets using Hiera configuration. A
>> typical configuration is:
>>
>> --foreman-proxy-dhcp=true \ --foreman-proxy-dhcp-interface=eth0 \
>> --foreman-proxy-dhcp-gateway=10.0.0.1 \
>> --foreman-proxy-dhcp-range="10.0.0.100 10.0.0.200" \
>> --foreman-proxy-dhcp-nameservers="10.0.1.2,10.0.1.3"
>>
>> https://theforeman.org/manuals/1.15/index.html#3.2ForemanInstaller
>>
>> On Sun, Sep 24, 2017 at 12:10 AM, Konstantin Raskoshnyi
>> <kraskosh...@gmail.com> wrote:
>>> Hi guys,
>>> I'm a new to foreman. I used to use spacewalk for a long time, trying to
>>> find a better solution for our company.
>>>
>>> I was trying to set up a demo box with foreman & isc dhcpd on centos 7.3.
>>> I followed the docs
>>> (http://projects.theforeman.org/projects/smart-proxy/wiki/ISC_DHCP)
>>> I added proxy feature, keys, dhcp network in foreman etc.
>>> Foreman says that dhcp feature is up and running.
>>> Docs say I need to start up dhcpd, which doesn't make any sense for me since
>>> I didn't configure any nets directly in /etc/dhcpd/dhcpd.conf, I assume
>>> foreman has to do that?
>>> Here's is config files:
>>>
>>> dhcpd.conf:
>>> #
>>> # DHCP Server Configuration file.
>>> #   see /usr/share/doc/dhcp*/dhcpd.conf.example
>>> #   see dhcpd.conf(5) man page
>>> #
>>> omapi-port 7911;
>>> key omapi_key {
>>> algorithm HMAC-MD5;
>>> secret
>>> "mmaA9cCfrl+KjQVQwbSQfN/LAyok58Kbb9Y4XrOs9UoK7j8ePYIGyDcNAWnDYFmdRgaEahs94rdAo4B9IyV6pA==";
>>> #<-The output from the generated key above.
>>> };
>>> omapi-key omapi_key;
>>>
>>>
>>> [root@foreman settings.d]# cat dhcp.yml
>>> ---
>>> # Enable DHCP management
>>> # Can be true, false, or http/https to enable just one of the protocols
>>> :enabled: true
>>>
>>> # valid providers:
>>> #   - dhcp_isc (ISC dhcp server)
>>> #   - dhcp_native_ms (Microsoft native implementation)
>>> #   - dhcp_libvirt (dnsmasq via libvirt)
>>> :use_provider: dhcp_isc
>>> :server: 127.0.0.1
>>> # subnets restricts the subnets queried to a subset, to reduce the query
>>> time.
>>> :subnets:
>>>  - 192.168.56.0/255.255.255.0
>>> #  - 192.168.205.128/255.255.255.128
>>>
>>> [root@foreman settings.d]# cat dhcp_isc.yml
>>> ---
>>> #
>>> # Configuration file for ISC dhcp provider
>>> #
>>>
>>> :config: /etc/dhcp/dhcpd.conf
>>> :leases: /var/lib/dhcpd/dhcpd.leases
>>>
>>> :key_name: omapi_key
>>> :key_secret:
>>> mmaA9cCfrl+KjQVQwbSQfN/LAyok58Kbb9Y4XrOs9UoK7j8ePYIGyDcNAWnDYFmdRgaEahs94rdAo4B9IyV6pA==
>>>
>>>
>>> :omapi_port: 7911
>>>
>>> # use :server setting in dhcp.yml if you are managing a dhcp server which is
>>> not localhost
>>>
>>>
>>> Will be happy to hear any suggestions.
>>> Happy weekend!
>>>
>>> --
>>> 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] Lots of "Mysql2::Error: Deadlock found when trying to get lock" under increased load

2017-10-09 Thread Lukas Zapletal
Hello,

please use git to find out which branches it landed in, I believe the
MySQL facter patch is 1.15+ only.

For 1.15.5 you need to talk with release engineer of this version
which is Daniel, if the changes are small enough I see no reason not
to include them. I think it's too late for 1.15.5 tho, maybe .6.

For smart proxy, there was a patch done by Dmitri who redesigned DHCP
parser, it's much more capable and faster now. I think this landed in
1.16 RC1, yeah: http://projects.theforeman.org/issues/19441
(https://github.com/theforeman/smart-proxy/commit/21813c6cde0d2be10747682f1a001a7c0bd3ffb9)

I did not hear about unresponsive smart-proxy processes, can you check
system limits (open handles etc)? SELinux? Firewall. Any proxy plugins
enable? Then file a redmine bug, haven't seen that.

On Fri, Oct 6, 2017 at 3:35 AM, 'Konstantin Orekhov' via Foreman users
 wrote:
>
>> Let us know next week if this helped. I highly suggest upgrade to
>> 1.15, it is a very solid release.
>
>
> Are there any performance improvements for Smart-Proxy in 1.15, BTW?
>
> Lately, in one of my busiest locations, we've started seeing a strange issue
> when SmP stops responding on 8443 for API calls. The process itself is
> running, logs messages are logged, just no response from it:
>
> [root@spc01 ~]# systemctl start foreman-proxy
>
> [root@spc01 ~]# date; curl --connect-timeout 30 -kSs
> https://localhost:8443/bmc; date
> Thu Oct  5 17:53:36 MST 2017
> curl: (7) Failed connect to localhost:8443; Connection refused
> Thu Oct  5 17:53:36 MST 2017
>
> It does take ~30 seconds to start up in our env because of large DHCP
> dataset, during which the connection would be refused.
>
>
> [root@spc01 ~]# date; curl --connect-timeout 30 -kSs
> https://localhost:8443/bmc; date
> Thu Oct  5 17:53:49 MST 2017
> curl: (28) NSS: client certificate not found (nickname not specified)
> Thu Oct  5 17:54:19 MST 2017
>
> Then it starts working for a very short period of time (above) and then
> stops (below).
>
> [root@spc01 ~]# date; curl --connect-timeout 30 -kSs
> https://localhost:8443/bmc; date
> Thu Oct  5 17:54:24 MST 2017
> curl: (28) Operation timed out after 30001 milliseconds with 0 out of 0
> bytes received
> Thu Oct  5 17:54:54 MST 2017
>
> So far there's nothing in proxy.log that helps me identify the issue. I
> can't replicate it at will no matter what I do - had a bunch clients hitting
> different APIs for a couple of days, nothing.
> Then today the above happens and the only thing that helped me is to move
> SmP from one node to another (I really wish DHCP SmP would allow for
> active/active horizontal scaling instead of just being limited to a single
> node).
> Strace is useless as it only give this on tracing "ruby foreman-proxy"
> process:
>
> [root@spc03 ~]# strace -p 12526
> strace: Process 12526 attached
> futex(0x184e634, FUTEX_WAIT_PRIVATE, 1, NULL^Cstrace: Process 12526 detached
>  
>
> I tried https://github.com/tmm1/rbtrace, but it is so heavy that it actually
> pretty much kills SmP by itself.
>
> Do you have any suggestions on ways to troubleshoot this? I have DEBUG
> enabled with these values:
>
> :log_buffer: 4000
> :log_buffer_errors: 2000
>
> Also, is a way to move SmP from WebBrick to Apache/Passenger if that makes
> sense at all? If so, any docs? Any other ways to increase the performance as
> it does feel like a performance issue to me.
>
> Thanks!
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Lots of "Mysql2::Error: Deadlock found when trying to get lock" under increased load

2017-10-05 Thread Lukas Zapletal
Let us know next week if this helped. I highly suggest upgrade to
1.15, it is a very solid release.

LZ

On Wed, Oct 4, 2017 at 11:04 PM, 'Konstantin Orekhov' via Foreman
users  wrote:
>
>> See the comment there, do you have this in your instance? If not git
>> blame the commit and apply it. You have some older version I assume.
>
>
> Yes, I'm running several 1.14.1 and 1.14.3 instances/clusters. Both had the
> same issue with deadlocks. I've updated 2 of them with above patch and was
> lucky enough to immediately observe a registration of at least 62 systems
> went through w/o a single error.
> I'll monitor things more, but so far this is huge steps forward.
>
> Thanks!
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Lots of "Mysql2::Error: Deadlock found when trying to get lock" under increased load

2017-10-04 Thread Lukas Zapletal
Ok I can see there is a subselect, these are sometimes painful
particularly for MySQL. We fixed that already, see in fact_importer.rb
(this is develop branch):

  def delete_removed_facts
ActiveSupport::Notifications.instrument
"fact_importer_deleted.foreman", :host_id => host.id, :host_name =>
host.name, :   +facts => facts, :deleted => [] do |payload|
  delete_query = FactValue.joins(:fact_name).where(:host => host,
'fact_names.type' => fact_name_class.name).where.
+not('fact_names.name' => facts.keys)
  if ActiveRecord::Base.connection.adapter_name.downcase.starts_with?
'mysql'
# MySQL does not handle delete with inner query correctly
(slow) so we will do two queries on purpose
payload[:count] = @counters[:deleted] = FactValue.where(:id =>
delete_query.pluck(:id)).delete_all
  else
# deletes all facts using a single SQL query with inner query otherwise
payload[:count] = @counters[:deleted] = delete_query.delete_all
  end
end
  end

See the comment there, do you have this in your instance? If not git
blame the commit and apply it. You have some older version I assume.

On Wed, Oct 4, 2017 at 1:38 AM, 'Konstantin Orekhov' via Foreman users
 wrote:
>
>> One more idea - we have seen similar (but different tables) deadlocks
>> when a background (cron) job we ship by default attempts to delete old
>> reports. Can you check if there is any cronjob or any other process
>> doing some management of facts? Even deleting lot of data can block
>> all updates for a long time (minutes to hours). Perhaps try to disable
>> all foreman jobs and re-test.
>
>
> I have tried this to no avail. However, I think the culprit of a problem is
> in very slow DELETE MySQL query, which is apparently happens even for
> absolutely new and freshly-discovered systems as well already discovered
> ones.
>
> 2017-09-28 13:09:49 c75f5c40 [sql] [D]   SQL (50843.2ms)  DELETE FROM
> `fact_values` WHERE `fact_values`.`id` IN
>
> Please see these gists I've recorded with SQL debug enabled. I have a ton of
> hosts doing exactly the same thing - try to register, mysql delete expires
> (it takes up to 50 sec as you can see), some rollback happens and expires
> again. And so on and so forth until systems register one by one. This
> results in many empty or duplicate entries even for a small batch of systems
> coming online at the same time.
>
> https://gist.github.com/anonymous/a721e220d82f5160450e483b8776489d
>
> The above examples are taken from a single Foreman instance running against
> a regular (non-Galera) MySQL DB, so at least I can say that the fact that I
> had several Foreman instances behind a load-balancer talking to
> Galera-replicated MySQL has nothing to do with this behavior. The only
> difference is that in Galera-enabled DB, expiration errors are replaced with
> deadlock error, which makes total sense - if delete operation takes almost a
> minute, no wonder it results in some rows being locked. As load increases
> (more systems register at the same time), more and more such errors are
> happening, so I believe a proper way to deal with this is optimize MySQL
> query first and the go from there. Would you agree?
>
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Foreman + Isc DHCP

2017-09-25 Thread Lukas Zapletal
Hello,

this page is pretty out of date (2013), you are not supposed to be
installing these services manually, we have a puppet-based installer
that does all the magic. If you do not want to use it, I recommend you
to install foreman on a test server and then investigate the
configuration files contents because your approach will be painful I
think.

Anyway, Foreman does manage DHCP records using OMAPI (adding/removing
records, tracking leases) but it does NOT create subnets. You need to
do this manually, our installer can create one subnet for you (it
requires it actually) and more subnets using Hiera configuration. A
typical configuration is:

--foreman-proxy-dhcp=true \ --foreman-proxy-dhcp-interface=eth0 \
--foreman-proxy-dhcp-gateway=10.0.0.1 \
--foreman-proxy-dhcp-range="10.0.0.100 10.0.0.200" \
--foreman-proxy-dhcp-nameservers="10.0.1.2,10.0.1.3"

https://theforeman.org/manuals/1.15/index.html#3.2ForemanInstaller

On Sun, Sep 24, 2017 at 12:10 AM, Konstantin Raskoshnyi
 wrote:
> Hi guys,
> I'm a new to foreman. I used to use spacewalk for a long time, trying to
> find a better solution for our company.
>
> I was trying to set up a demo box with foreman & isc dhcpd on centos 7.3.
> I followed the docs
> (http://projects.theforeman.org/projects/smart-proxy/wiki/ISC_DHCP)
> I added proxy feature, keys, dhcp network in foreman etc.
> Foreman says that dhcp feature is up and running.
> Docs say I need to start up dhcpd, which doesn't make any sense for me since
> I didn't configure any nets directly in /etc/dhcpd/dhcpd.conf, I assume
> foreman has to do that?
> Here's is config files:
>
> dhcpd.conf:
> #
> # DHCP Server Configuration file.
> #   see /usr/share/doc/dhcp*/dhcpd.conf.example
> #   see dhcpd.conf(5) man page
> #
> omapi-port 7911;
> key omapi_key {
> algorithm HMAC-MD5;
> secret
> "mmaA9cCfrl+KjQVQwbSQfN/LAyok58Kbb9Y4XrOs9UoK7j8ePYIGyDcNAWnDYFmdRgaEahs94rdAo4B9IyV6pA==";
> #<-The output from the generated key above.
> };
> omapi-key omapi_key;
>
>
> [root@foreman settings.d]# cat dhcp.yml
> ---
> # Enable DHCP management
> # Can be true, false, or http/https to enable just one of the protocols
> :enabled: true
>
> # valid providers:
> #   - dhcp_isc (ISC dhcp server)
> #   - dhcp_native_ms (Microsoft native implementation)
> #   - dhcp_libvirt (dnsmasq via libvirt)
> :use_provider: dhcp_isc
> :server: 127.0.0.1
> # subnets restricts the subnets queried to a subset, to reduce the query
> time.
> :subnets:
>   - 192.168.56.0/255.255.255.0
> #  - 192.168.205.128/255.255.255.128
>
> [root@foreman settings.d]# cat dhcp_isc.yml
> ---
> #
> # Configuration file for ISC dhcp provider
> #
>
> :config: /etc/dhcp/dhcpd.conf
> :leases: /var/lib/dhcpd/dhcpd.leases
>
> :key_name: omapi_key
> :key_secret:
> mmaA9cCfrl+KjQVQwbSQfN/LAyok58Kbb9Y4XrOs9UoK7j8ePYIGyDcNAWnDYFmdRgaEahs94rdAo4B9IyV6pA==
>
>
> :omapi_port: 7911
>
> # use :server setting in dhcp.yml if you are managing a dhcp server which is
> not localhost
>
>
> Will be happy to hear any suggestions.
> Happy weekend!
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Lots of "Mysql2::Error: Deadlock found when trying to get lock" under increased load

2017-09-22 Thread Lukas Zapletal
Hey, you are absolutely right that this is huge design gap in
discovery, we are tracking a refactor ticket to redesign how
discovered hosts are stored, but this is complete change of how
discovery hosts are being provisioned (you would not be able to use
New Hosts screen for example). I think this change will happen as soon
as we redesign new host form to be a session-full wizard.

A workaround could be a setting that would attempt to delete existing
host when new one is discovered, but this would be very dangerous
thing (security related), not sure if that is feasible even via
opt-in.

In the past, we have seen these deadlocks (on fact_name or fact_value)
because this is very busy table - discovery, facter/ENC and other
plugins (katello rhsm, openscap, ansible...) are all writing there or
changing data. I am unable to tell from info you provided what is
going on - you need to dig deeper.

One more idea - we have seen similar (but different tables) deadlocks
when a background (cron) job we ship by default attempts to delete old
reports. Can you check if there is any cronjob or any other process
doing some management of facts? Even deleting lot of data can block
all updates for a long time (minutes to hours). Perhaps try to disable
all foreman jobs and re-test.

LZ

On Thu, Sep 21, 2017 at 2:27 AM, 'Konstantin Orekhov' via Foreman
users <foreman-users@googlegroups.com> wrote:
>
> On Wednesday, September 20, 2017 at 3:55:43 AM UTC-7, Lukas Zapletal wrote:
>>
>> A MAC address can only exist once, if you already have a
>> (managed/unmanaged) host and you try to discover a host with same MAC,
>> you will get error. Depending on Foreman discovery it is either 422 or
>> "Host already exists":
>>
>> https://github.com/theforeman/foreman_discovery/commit/210f143bc85c58caeb67e8bf9a5cc2edbe764683
>
>
> Hmm, one generic question on this - according to above logic, if my managed
> host had crashed, say because it lost its HW RAID controller, for example,
> so it can't boot off the disk anymore thus resulting in PXE boot (given that
> BIOS boot order is set that way), correct?
> Now, by default, Foreman default pxeconfig file makes a system to boot off
> its disk, which in this particular situation will result in endless loop
> until some external (to Foreman) monitoring detects a system failure, then a
> human gets on a console and real troubleshooting starts only then.
> That does not scale beyond a 100 systems or so. For this reason in our
> current setup where we *don't* use Foreman for OS provisioning but only for
> system discovery, I've updated the default pxeconfig to always load a
> discovery OS. This covers both a new systems and a crashed system scenario I
> described above. Each of discovered hosts is reported to a higher layer of
> orchestration on a after_commit event and that orchestration handles OS
> provisioning on its own so the discovered system never ends up in managed
> hosts in Foreman. Once OS provisioning is done, higher layer comes and
> deletes a host it just provisioned from discovered hosts. If orchestration
> detects that a hook call from Foreman reports a system that was previously
> provisioned, such system is automatically marked "maintenance" and HW
> diagnostics auto-started. Based on the result of that, orchestration will
> start either a HW replacement flow or a new problem troubleshooting starts.
> As you can see, humans are only involved very late in a process and only if
> auto-remediation is not possible (HW component failed, unknown signature
> detected). Otherwise, at large scale environments it is just impossible to
> attend to each of failed system individually. Such automation flow is
> allowing us to save hundreds of man-hours, as you can imagine.
> Now, with that in mind, I was thinking of moving actual OS provisioning
> tasks to Foreman as well. However, if crashed system would never be allowed
> to re-register (get discovered) because it is already managed by Foreman,
> the above flow is just not going to work anymore and I'd have re-think all
> flows. Are there specific reasons why this in place? I understand that this
> is how it is implemented now, but is there a bigger idea behind that? If so,
> what is it? Also, if you take my example of flows stitching for a complete
> system lifecycle management, what would you suggest we could do differently
> to allow Foreman to be a system that we use for both discovery and OS
> provisioning?
>
> Another thing (not as generic as above, but actually very applicable to my
> current issue) - if a client system is not allowed to register and given 422
> error, for example, it keeps trying to register resulting in huge amount of
> work. This is also a gap, IMHO - discovery plug-in needs to do this
> differently somehow so reject

Re: [foreman-users] Lots of "Mysql2::Error: Deadlock found when trying to get lock" under increased load

2017-09-20 Thread Lukas Zapletal
A MAC address can only exist once, if you already have a
(managed/unmanaged) host and you try to discover a host with same MAC,
you will get error. Depending on Foreman discovery it is either 422 or
"Host already exists":
https://github.com/theforeman/foreman_discovery/commit/210f143bc85c58caeb67e8bf9a5cc2edbe764683

Anyway you wrote you have deadlocks, but in the log snippet I do see
that you have host discovery at rate 1-2 imports per minute. This
cannot block anything, this is quite slow rate. I don't understand,
can you pastebin log snippet from the peak time when you have these
deadlocks?



On Tue, Sep 19, 2017 at 10:03 PM, 'Konstantin Orekhov' via Foreman
users  wrote:
> After I got the debug output, I've deleted this host from Foreman and on its
> next attempt it got registered perfectly fine - no issues with interfaces or
> anything anymore:
>
> (on a client side)
>
> Discovered by URL: https://spc.vip
> Registering host with Foreman (https://spc.vip)
> Response from Foreman 201: {"id":447371,"name":"mac3cfdfe52252c" 
>
> (on Foreman side):
> 2017-09-19 12:39:34 7ca37aca [app] [I] Started DELETE
> "/discovered_hosts/mac3cfdfe52252c" for 10.102.141.20 at 2017-09-19 12:39:34
> -0700
> 2017-09-19 12:39:34 7ca37aca [app] [I]   Parameters:
> {"authenticity_token"=>"", "id"=>"mac3cfdfe52252c"}
>
> 2017-09-19 12:40:04 1a346c39 [app] [I] Started POST
> "/api/v2/discovered_hosts/facts" for 10.102.141.20 at 2017-09-19 12:40:04
> -0700
> 2017-09-19 12:40:04 1a346c39 [app] [I] Processing by
> Api::V2::DiscoveredHostsController#facts as JSON
> 2017-09-19 12:40:04 1a346c39 [app] [I]   Parameters: {"facts"=>"[FILTERED]",
> "apiv"=>"v2", "discovered_host"=>{"facts"=>"[FILTERED]"}}
> 2017-09-19 12:40:06 1a346c39 [audit] [I] [mac3cfdfe52252c] deleted 0
> (1694.6ms)
> 2017-09-19 12:40:06 1a346c39 [audit] [I] [mac3cfdfe52252c] updated 0 (2.6ms)
> 2017-09-19 12:40:07 1a346c39 [audit] [I] [mac3cfdfe52252c] added 385
> (1637.5ms)
> 2017-09-19 12:40:07 1a346c39 [app] [I] Import facts for 'mac3cfdfe52252c'
> completed. Added: 385, Updated: 0, Deleted 0 facts
>
> It would be nice to figure out what's causing this in a first place - I do
> see a lot of those "Unprocessable Entity" messages logged.
> Thanks!
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Lots of "Mysql2::Error: Deadlock found when trying to get lock" under increased load

2017-09-20 Thread Lukas Zapletal
Well no, the biggest update was for 1.14 there:

http://projects.theforeman.org/issues/9016

That focused on memory consumption tho, there was a little speedup but
nothing big.

On Tue, Sep 19, 2017 at 10:05 PM, 'Konstantin Orekhov' via Foreman
users  wrote:
> BTW, Lukas, you mentioned that some improvements were made in 1.14. I am
> running 1.14.1 and 1.14.3.
> Did you mean 1.15 maybe? Should I even consider an upgrade to help resolve
> this situation?
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Lots of "Mysql2::Error: Deadlock found when trying to get lock" under increased load

2017-09-19 Thread Lukas Zapletal
I would rather fix importing code to be faster than doing async, that
is the last resort.

Konstantin, thanks for analysis. Our import code is slow indeed, we
improved it a bit in 1.14. Note we mostly test this on PostgreSQL. For
each import, there is a log in INFO level about how much time was
spent in each phase of import (delete, add, update). Can you share the
numbers there?

What happens *I think* is that by default every node tries to update
facts every 5 minutes. At that scale, you need to increase this to
more resonable value.

When Foreman is busy, these requests can stack up. We are not using
transactions, so imports can fail leaving incorrect records.

LZ

On Tue, Sep 19, 2017 at 8:12 AM, Ohad Levy  wrote:
>
>
> On Fri, Sep 15, 2017 at 8:56 PM, 'Konstantin Orekhov' via Foreman users
>  wrote:
>>
>>
>>>
>>> what kind of load do you have? Puppet? Facter? Is that ENC? Something
>>> else?
>>>
>>> Can you tell which requests are slow from logs or monitoring?
>>>
>>
>> Yes, I should have mentioned that - there's very little puppet and ENC
>> work done by this cluster at this point (more is coming soon though). Host
>> discovery is by far the largest workload - 7600 discovered systems at this
>> point. The last spike that I saw the impact to overall flows was when
>> 300-400 systems were trying to register at the same time. Because of the
>> deadlocks, about 200-300 systems could not register repeatedly and had to
>> keep retrying for a rather long time.
>> Rather often these registration attempts would end up creating either
>> duplicate entries with the same "mac" but different IDs in a DB or an
>> "empty" discovery host entry. Both of these would prevent a system
>> successfully register unless they are removed (I had to write a little
>> script that runs from the cron to do so). Here are the examples of an
>> "empty" record and duplicate ones (as they get deleted):
>>
>
> Lukas - how about we change discovery to be async? e.g. import all new
> discovered systems into active job and than process than one / multiple at a
> time? I assume this would require a image change too (so it knows when the
> discovery"job" is done)
>>
>> {
>> "id": 437923,
>> "name": "mac90e2bae6cc70",
>> "last_compile": null,
>> "last_report": null,
>> "updated_at": "2017-08-22T07:08:54.000Z",
>> "created_at": "2017-08-22T07:08:54.000Z",
>> "root_pass": "",
>> "architecture_id": null,
>> "operatingsystem_id": null,
>> "environment_id": null,
>> "ptable_id": null,
>> "medium_id": null,
>> "build": false,
>> "comment": null,
>> "disk": null,
>> "installed_at": null,
>> "model_id": null,
>> "hostgroup_id": null,
>> "owner_id": null,
>> "owner_type": null,
>> "enabled": true,
>> "puppet_ca_proxy_id": null,
>> "managed": false,
>> "use_image": null,
>> "image_file": null,
>> "uuid": null,
>> "compute_resource_id": null,
>> "puppet_proxy_id": null,
>> "certname": null,
>> "image_id": null,
>> "organization_id": null,
>> "location_id": null,
>> "otp": null,
>> "realm_id": null,
>> "compute_profile_id": null,
>> "provision_method": null,
>> "grub_pass": "",
>> "global_status": 0,
>> "lookup_value_matcher": null,
>> "discovery_rule_id": null,
>> "salt_proxy_id": null,
>> "salt_environment_id": null,
>> "pxe_loader": null
>> }
>>
>> Duplicates (usually the later duplicate would be an empty one as well, but
>> not all the time):
>>
>> {
>>   "id": 430090,
>>   "name": "mac3417ebe3f8f1",
>>   "last_compile": null,
>>   "last_report": "2017-09-14T19:47:55.000Z",
>>   "updated_at": "2017-09-14T19:47:57.000Z",
>>   "created_at": "2017-03-08T20:24:05.000Z",
>>   "root_pass": "",
>>   "architecture_id": null,
>>   "operatingsystem_id": null,
>>   "environment_id": null,
>>   "ptable_id": null,
>>   "medium_id": null,
>>   "build": false,
>>   "comment": null,
>>   "disk": null,
>>   "installed_at": null,
>>   "model_id": 3,
>>   "hostgroup_id": null,
>>   "owner_id": 10,
>>   "owner_type": "User",
>>   "enabled": true,
>>   "puppet_ca_proxy_id": null,
>>   "managed": false,
>>   "use_image": null,
>>   "image_file": null,
>>   "uuid": null,
>>   "compute_resource_id": null,
>>   "puppet_proxy_id": null,
>>   "certname": null,
>>   "image_id": null,
>>   "organization_id": null,
>>   "location_id": null,
>>   "otp": null,
>>   "realm_id": null,
>>   "compute_profile_id": null,
>>   "provision_method": null,
>>   "grub_pass": "",
>>   "global_status": 0,
>>   "lookup_value_matcher": null,
>>   "discovery_rule_id": null,
>>   "salt_proxy_id": null,
>>   "salt_environment_id": null,
>>   "pxe_loader": null
>> }
>> {
>>   "id": 438146,
>>   "name": "mac3417ebe3f8f1",
>>   "last_compile": null,
>>   "last_report": "2017-09-11T08:58:05.000Z",
>>   "updated_at": "2017-09-11T08:58:07.000Z",
>>   "created_at": 

Re: [foreman-users] Lots of "Mysql2::Error: Deadlock found when trying to get lock" under increased load

2017-09-15 Thread Lukas Zapletal
Hey,

what kind of load do you have? Puppet? Facter? Is that ENC? Something else?

Can you tell which requests are slow from logs or monitoring?

LZ

On Fri, Sep 15, 2017 at 3:35 AM, 'Konstantin Orekhov' via Foreman
users  wrote:
>
> Hi, all!
>
> Under increased load (which comes in spikes), I noticed lots of mysql
> deadlock errors resulting in failed transactions and incorrectly discovered
> systems (duplicate and/or empty entries in discovered_hosts I reported in
> this group some time ago, just can't find those posts for some reason).
>
> Anyway, these are the type of messages I receive:
>
> 2017-09-14 15:01:13 173c1d40 [app] [E] Fact processor37 could not be
> imported because of Mysql2::Error: Deadlock found when trying to get lock;
> try restarting transaction: SELECT  1 AS one FROM `fact_values` WHERE
> (`fact_values`.`fact_name_id` = BINARY 248 AND `fact_values`.`host_id` =
> 446074) LIMIT 1
> 2017-09-14 15:01:14 173c1d40 [audit] [I] [mac90e2bae93da0] added 353
> (2693.0ms)
> 2017-09-14 15:01:14 173c1d40 [app] [W] Error during fact import for
> mac90e2bae93da0
>  | ActiveRecord::StatementInvalid: Mysql2::Error: Deadlock found when trying
> to get lock; try restarting transaction: SELECT  1 AS one FROM `fact_values`
> WHERE (`fact_values`.`fact_name_id` = BINARY 248 AND `fact_values`.`host_id`
> = 446074) LIMIT 1
>  |
> /opt/theforeman/tfm/root/usr/share/gems/gems/mysql2-0.4.5/lib/mysql2/client.rb:120:in
> `_query'
>  |
> /opt/theforeman/tfm/root/usr/share/gems/gems/mysql2-0.4.5/lib/mysql2/client.rb:120:in
> `block in query'
>  |
> /opt/theforeman/tfm/root/usr/share/gems/gems/mysql2-0.4.5/lib/mysql2/client.rb:119:in
> `handle_interrupt'
>  |
> /opt/theforeman/tfm/root/usr/share/gems/gems/mysql2-0.4.5/lib/mysql2/client.rb:119:in
> `query'
> 
>
> I do run an active/active cluster of 3 1.14.x Foreman VMs with replicated
> MariaDB Mysql backend.
>
> I saw a couple of people were the same questions in the IRC chat, but I
> could not find any responses to that over there.
>
> Anyone has any suggestions/recommendations? Anything like
> https://github.com/qertoip/transaction_retry is planned to be used instead
> of failing transactions in Foreman?
>
> Thanks!
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] dhcp filename option for pxeboot of Power PC architecture

2017-09-05 Thread Lukas Zapletal
Few more questions:

- What kind of POWER hardware is it? Some POWER machines have network
cards with Petitboot firmware which is capable of downloading
configuration in PXELinux syntax and then directly loading the kernel.
In this case, you need to provide your own PXELinux configuration (you
can use foreman templating capabilities to generate the contents of
course), but we don't have any templates with this - not sure if
default PXELinux templates will work, I guess they will not (kernel
and initramdisk).

More info here:

http://jk.ozlabs.org/blog/post/158/netbooting-petitboot/

If this is the case, I think you want to create your host in Foreman
with PXELinux BIOS flag and it will have filename option "pxelinux.0"
which should be ignored by petitboot and then it will try to load the
configuration from standard paths.


On Tue, Sep 5, 2017 at 7:52 AM, Lukas Zapletal <l...@redhat.com> wrote:
> Danielle,
>
> I've talked to our Grub2/PXE/BOOTP/POWER experts, can you get us:
>
> dhcpd.conf
> grub.conf
> network comm dump (wireshark or similar)
>
> Thanks
>
> On Mon, Sep 4, 2017 at 9:19 AM, Lukas Zapletal <l...@redhat.com> wrote:
>> First of all, is your PPC CLIENT big or little endian? I see it is
>> trying to load little endian which is I believe less common to have.
>>
>> Anyway, let's rule out Foreman completely, can you setup DHCP and TFTP
>> using our official documentation? Including generating tftpboot
>> directory structure via grub2-mknetdir, make sure to use the target
>> platform with correct endian, then scp the files onto TFTP server,
>> setup DHCP and try then:
>>
>> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/chap-installation-server-setup.html#sect-network-boot-setup-ppc-grub2
>>
>> The  filename should be set correctly to
>> "boot/grub2/powerpc-ieee1275/core.elf" now. Does it load from correct
>> paths now?
>>
>> I have built the core.elf from RHEL 7.4, can you try that as well?
>> http://people.redhat.com/~lzapleta/test/grub2-ppc-test.tar.xz
>>
>> Let's find out that first.
>>
>>
>>
>>
>> On Fri, Sep 1, 2017 at 10:51 AM, Daniele Gregori (E4)
>> <daniele.greg...@e4company.com> wrote:
>>> Hi Lukas,
>>>The system composed by Foreman (tftp) server and Power PC client is 
>>> centos 7.
>>> I take the Foreman bootloader and move the grubppc64le.efi to the 
>>> /var/lib/tftpboot/grub2 directory with the same result, from 
>>> /var/log/messages:
>>>
>>> Sep  1 09:26:54 srv-install dhcpd: DHCPDISCOVER from 70:e2:84:14:1c:13 via 
>>> eno16780032
>>> Sep  1 09:26:54 srv-install dhcpd: DHCPOFFER on 172.16.2.207 to 
>>> 70:e2:84:14:1c:13 via eno16780032
>>> Sep  1 09:26:54 srv-install dhcpd: Dynamic and static leases present for 
>>> 172.16.2.207.
>>> Sep  1 09:26:54 srv-install dhcpd: Remove host declaration davide13.e4srv 
>>> or remove 172.16.2.207
>>> Sep  1 09:26:54 srv-install dhcpd: from the dynamic address pool for 
>>> 172.16.2.0/24
>>> Sep  1 09:26:54 srv-install dhcpd: DHCPREQUEST for 172.16.2.207 
>>> (172.16.2.2) from 70:e2:84:14:1c:13 via eno16780032
>>> Sep  1 09:26:54 srv-install dhcpd: DHCPACK on 172.16.2.207 to 
>>> 70:e2:84:14:1c:13 via eno16780032
>>> Sep  1 09:26:54 srv-install in.tftpd[18238]: RRQ from 172.16.2.207 filename 
>>> /grub2/pxelinux.cfg/01-70-e2-84-14-1c-13
>>> Sep  1 09:26:54 srv-install in.tftpd[18238]: sending NAK (1, File not 
>>> found) to 172.16.2.207
>>> Sep  1 09:26:54 srv-install in.tftpd[18239]: RRQ from 172.16.2.207 filename 
>>> /grub2/pxelinux.cfg/AC1002CF
>>> Sep  1 09:26:54 srv-install in.tftpd[18239]: sending NAK (1, File not 
>>> found) to 172.16.2.207
>>> Sep  1 09:26:54 srv-install in.tftpd[18240]: RRQ from 172.16.2.207 filename 
>>> /grub2/pxelinux.cfg/AC1002C
>>> Sep  1 09:26:54 srv-install in.tftpd[18240]: sending NAK (1, File not 
>>> found) to 172.16.2.207
>>> Sep  1 09:26:54 srv-install in.tftpd[18241]: RRQ from 172.16.2.207 filename 
>>> /grub2/pxelinux.cfg/AC1002
>>> Sep  1 09:26:54 srv-install in.tftpd[18241]: sending NAK (1, File not 
>>> found) to 172.16.2.207
>>> Sep  1 09:26:54 srv-install in.tftpd[18242]: RRQ from 172.16.2.207 filename 
>>> /grub2/pxelinux.cfg/AC100
>>> Sep  1 09:26:54 srv-install in.tftpd[18242]: sending NAK (1, File not 
>>> found) to 172.16.2.207
>>> Sep  1 09:26:54 srv-install in.tftpd[18243]: RRQ from 172.16.2.207 filename 
>>> /grub2/pxelinux.cfg/AC10
>&g

Re: [foreman-users] dhcp filename option for pxeboot of Power PC architecture

2017-09-04 Thread Lukas Zapletal
Danielle,

I've talked to our Grub2/PXE/BOOTP/POWER experts, can you get us:

dhcpd.conf
grub.conf
network comm dump (wireshark or similar)

Thanks

On Mon, Sep 4, 2017 at 9:19 AM, Lukas Zapletal <l...@redhat.com> wrote:
> First of all, is your PPC CLIENT big or little endian? I see it is
> trying to load little endian which is I believe less common to have.
>
> Anyway, let's rule out Foreman completely, can you setup DHCP and TFTP
> using our official documentation? Including generating tftpboot
> directory structure via grub2-mknetdir, make sure to use the target
> platform with correct endian, then scp the files onto TFTP server,
> setup DHCP and try then:
>
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/chap-installation-server-setup.html#sect-network-boot-setup-ppc-grub2
>
> The  filename should be set correctly to
> "boot/grub2/powerpc-ieee1275/core.elf" now. Does it load from correct
> paths now?
>
> I have built the core.elf from RHEL 7.4, can you try that as well?
> http://people.redhat.com/~lzapleta/test/grub2-ppc-test.tar.xz
>
> Let's find out that first.
>
>
>
>
> On Fri, Sep 1, 2017 at 10:51 AM, Daniele Gregori (E4)
> <daniele.greg...@e4company.com> wrote:
>> Hi Lukas,
>>The system composed by Foreman (tftp) server and Power PC client is 
>> centos 7.
>> I take the Foreman bootloader and move the grubppc64le.efi to the 
>> /var/lib/tftpboot/grub2 directory with the same result, from 
>> /var/log/messages:
>>
>> Sep  1 09:26:54 srv-install dhcpd: DHCPDISCOVER from 70:e2:84:14:1c:13 via 
>> eno16780032
>> Sep  1 09:26:54 srv-install dhcpd: DHCPOFFER on 172.16.2.207 to 
>> 70:e2:84:14:1c:13 via eno16780032
>> Sep  1 09:26:54 srv-install dhcpd: Dynamic and static leases present for 
>> 172.16.2.207.
>> Sep  1 09:26:54 srv-install dhcpd: Remove host declaration davide13.e4srv or 
>> remove 172.16.2.207
>> Sep  1 09:26:54 srv-install dhcpd: from the dynamic address pool for 
>> 172.16.2.0/24
>> Sep  1 09:26:54 srv-install dhcpd: DHCPREQUEST for 172.16.2.207 (172.16.2.2) 
>> from 70:e2:84:14:1c:13 via eno16780032
>> Sep  1 09:26:54 srv-install dhcpd: DHCPACK on 172.16.2.207 to 
>> 70:e2:84:14:1c:13 via eno16780032
>> Sep  1 09:26:54 srv-install in.tftpd[18238]: RRQ from 172.16.2.207 filename 
>> /grub2/pxelinux.cfg/01-70-e2-84-14-1c-13
>> Sep  1 09:26:54 srv-install in.tftpd[18238]: sending NAK (1, File not found) 
>> to 172.16.2.207
>> Sep  1 09:26:54 srv-install in.tftpd[18239]: RRQ from 172.16.2.207 filename 
>> /grub2/pxelinux.cfg/AC1002CF
>> Sep  1 09:26:54 srv-install in.tftpd[18239]: sending NAK (1, File not found) 
>> to 172.16.2.207
>> Sep  1 09:26:54 srv-install in.tftpd[18240]: RRQ from 172.16.2.207 filename 
>> /grub2/pxelinux.cfg/AC1002C
>> Sep  1 09:26:54 srv-install in.tftpd[18240]: sending NAK (1, File not found) 
>> to 172.16.2.207
>> Sep  1 09:26:54 srv-install in.tftpd[18241]: RRQ from 172.16.2.207 filename 
>> /grub2/pxelinux.cfg/AC1002
>> Sep  1 09:26:54 srv-install in.tftpd[18241]: sending NAK (1, File not found) 
>> to 172.16.2.207
>> Sep  1 09:26:54 srv-install in.tftpd[18242]: RRQ from 172.16.2.207 filename 
>> /grub2/pxelinux.cfg/AC100
>> Sep  1 09:26:54 srv-install in.tftpd[18242]: sending NAK (1, File not found) 
>> to 172.16.2.207
>> Sep  1 09:26:54 srv-install in.tftpd[18243]: RRQ from 172.16.2.207 filename 
>> /grub2/pxelinux.cfg/AC10
>> Sep  1 09:26:54 srv-install in.tftpd[18243]: sending NAK (1, File not found) 
>> to 172.16.2.207
>> Sep  1 09:26:54 srv-install in.tftpd[18244]: RRQ from 172.16.2.207 filename 
>> /grub2/pxelinux.cfg/AC1
>> Sep  1 09:26:54 srv-install in.tftpd[18244]: sending NAK (1, File not found) 
>> to 172.16.2.207
>> Sep  1 09:26:54 srv-install in.tftpd[18245]: RRQ from 172.16.2.207 filename 
>> /grub2/pxelinux.cfg/AC
>> Sep  1 09:26:54 srv-install in.tftpd[18245]: sending NAK (1, File not found) 
>> to 172.16.2.207
>> Sep  1 09:26:54 srv-install in.tftpd[18246]: RRQ from 172.16.2.207 filename 
>> /grub2/pxelinux.cfg/A
>> Sep  1 09:26:54 srv-install in.tftpd[18246]: sending NAK (1, File not found) 
>> to 172.16.2.207
>> Sep  1 09:26:54 srv-install in.tftpd[18247]: RRQ from 172.16.2.207 filename 
>> /grub2/pxelinux.cfg/default
>> Sep  1 09:26:54 srv-install in.tftpd[18247]: sending NAK (1, File not found) 
>> to 172.16.2.207
>>
>> I don’t understand who set the file: 
>> /grub2/pxelinux.cfg/01-70-e2-84-14-1c-13.
>> I tried also to do:
>>
>> cp grub.cfg-01-54-ab-3a-71-3f-d6 pxelinux.cfg/AC1002C

Re: [foreman-users] Foreman discovery image issue with UEFI client hosts

2017-09-04 Thread Lukas Zapletal
Hello,

there is no stable build of PXELinux EFI yet, we do not recommend
using that. For UEFI we do recommend Grub2. Therefore by default we
build into Grub2 for PC with UEFI enabled, see dhcpd.conf:

if option architecture = 00:06 {
  filename "grub2/shim.efi";
} elsif option architecture = 00:07 {
  filename "grub2/shim.efi";
} elsif option architecture = 00:09 {
  filename "grub2/shim.efi";
} else {
  filename "pxelinux.0";
}

It loads shim.efi which loads grubx64.efi which tries to load grub2/grub.conf.

The PXELinux template is irrelevant here. You need to check grub.conf
there where you need to have something like:

menuentry 'Foreman Discovery Image' {
  linuxefi boot/fdi-image/vmlinuz0 rootflags=loop root=live:/fdi.iso
rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0
rd.lvm=0 rd.bootif=0 rd.neednet=0 nomodeset
proxy.url=https://zzzap.lab.eng.brq.redhat.com proxy.type=foreman
BOOTIF=01-$net_default_mac
  initrdefi boot/fdi-image/initrd0.img
}

By default it timeouts on Boot from local disk, you make this option
default via default/timeout options.


On Fri, Sep 1, 2017 at 3:14 PM, Mrinmoy Acharya
<mrinmoyacha...@gmail.com> wrote:
> Hi Lukas ,
>
> The error is the black grub screen again after the change
>
> it does not boot up the foreman discovery image.
>
> i boot up the client in uefi mode ==> it goes till " fetching netboot
> image==> then the black grub screen.
>
> one thing i would like to know where in the grub.cfg it is pointing to the
> foreman discovery .iso... i mean the vmkernel or the initrd ...of foreman
> discovery ...like it does for the legacy bios in following snippet from
>
>
> https://theforeman.org/plugins/foreman_discovery/9.1/index.html#3.Configuration
> ...my point is how can boot the discovery image in new machines booted in
> UEFI...
>
>
> 3.1 Foreman Discovery plugin
>
> Foreman Discovery relies on intercepting the normal boot process for
> machines not registered in Foreman. To achieve this, the PXE default.cfg
> file needs to be altered to instruct new machines to boot the discovery
> image.
>
> 3.1.1 Default PXE template
>
> In the Foreman UI, go to Provisioning Templates, edit PXELinux global
> default template and change the default entry from localboot entry to
> Discovery:
>
> ONTIMEOUT discovery
>
> The template already contains a menu entry rendered from pxelinux_discovery
> snippet which looks like:
>
> LABEL discovery
> MENU LABEL Foreman Discovery Image
> KERNEL boot/fdi-image/vmlinuz0
> APPEND initrd=boot/fdi-image/initrd0.img ... proxy.url=<%=
> foreman_server_url %> proxy.type=foreman
> IPAPPEND 2
>
>
> thanks and regards,
>
> Mrinmoy
>
> On Thursday, August 31, 2017 at 5:49:34 PM UTC+5:30, Lukas Zapletal wrote:
>>
>> Sorry please remove the test
>>
>> if [ -f "$configfile" ]; then
>>   source "$configfile"
>> fi
>>
>> to
>>
>> source "$configfile"
>>
>> It was not working properly. Then watch system journal and boot the
>> file, paste what Grub2 was searching for.
>>
>> On Wed, Aug 30, 2017 at 2:24 PM, Mrinmoy Acharya
>> <mrinmoy...@gmail.com> wrote:
>> > Hi Lukas,
>> >
>> > Thanks alot for your help.
>> >
>> > Following is my currentgrub2/grub.cfg  edited  after checking the
>> > github
>> > link   however, after EFI boot the screen i am geeting is a black
>> > grub
>> > prompt screenPlease let me know which line to correct.
>> >
>> > =
>> >
>> > [root@foreman grub2]# cat grub.cfg
>> > insmod regexp
>> > set net_pxe_mac=$net_default_mac
>> >  regexp --set=1:m1 --set=2:m2 --set=3:m3 --set=4:m4 --set=5:m5
>> > --set=6:m6
>> >
>> > '^([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})'
>> > "$net_default_mac"
>> >  mac=${m1}-${m2}-${m3}-${m4}-${m5}-${m6}
>> >  configfile=/grub2/grub.cfg-01-$mac
>> > if [ -f "$configfile" ]; then
>> >   source "$configfile"
>> > fi
>> >
>> >  <%= snippet "pxegrub2_chainload" %>
>> >
>> > ===
>> >
>> >
>> >
>> >
>> >
>> > On Tuesday, August 29, 2017 at 3:30:55 PM UTC+5:30, Lukas Zapletal
>> > wrote:
>> >>
>> >> What is 

Re: [foreman-users] dhcp filename option for pxeboot of Power PC architecture

2017-09-04 Thread Lukas Zapletal
 the dynamic address pool for 
> 172.16.2.0/24
> Sep  1 10:43:06 srv-install dhcpd: DHCPREQUEST for 172.16.2.207 (172.16.2.2) 
> from 70:e2:84:14:1c:13 via eno16780032
> Sep  1 10:43:06 srv-install dhcpd: DHCPACK on 172.16.2.207 to 
> 70:e2:84:14:1c:13 via eno16780032
> Sep  1 10:43:06 srv-install in.tftpd[17038]: RRQ from 172.16.2.207 filename 
> /grub2/pxelinux.cfg/01-70-e2-84-14-1c-13
> Sep  1 10:43:27 srv-install dhcpd: DHCPDISCOVER from a4:bf:01:05:fe:87 
> (DCMIA4BF0105FE85) via 172.17.0.1
> Sep  1 10:43:30 srv-install in.tftpd[17050]: RRQ from 172.16.2.207 filename 
> /grub2/grubppc64le.efi
> Sep  1 10:43:30 srv-install dhcpd: none: host unknown.
> Sep  1 10:44:32 srv-install dhcpd: none: host unknown.
> Sep  1 10:44:38 srv-install dhcpd: DHCPRELEASE of 172.16.2.207 from 
> 70:e2:84:14:1c:13 via eno16780032 (not found)
>
> Without more info.
>
> From the client side I receive the messages:
>
> booting netboot enP5p7s0f0 (grub2/grubppc64le.efi).
> Error: kexec load failed
>
> There is something that escapes me.
> Can I improve the debug with more informations?
> Hints?
>
> Thanks
>
> Daniele
>
>
>
>
> On 01/09/2017, 09:00, "foreman-users@googlegroups.com on behalf of Lukas 
> Zapletal" <foreman-users@googlegroups.com on behalf of l...@redhat.com> wrote:
>
> Is this non-Red Hat OS? I mean the system that serves the DHCP/TFTP?
>
> > [root@srv-install grub2]# ln -s /var/lib/tftpboot/core.elf   
> grubppc64le.efi
>
> TFTP runs in chroot, never do absolute symlinks, only relative. Not
> sure if this is same for non-RH OS tho.
>
> > Aug 31 17:47:54 srv-install in.tftpd[3851]: RRQ from 172.16.2.207 
> filename /grub2/pxelinux.cfg/01-70-e2-84-14-1c-13
>
> This is weird, the path should be /grub2.
>
> Where this core.elf comes from? Can you try grubppc64le.efi from
> foreman-bootloaders package? We don't yet have debian packages, you
> can just unpack upstream tarball here:
>
> http://downloads.theforeman.org/foreman-bootloaders/
>
> If that fails, try to build core.elf. yourself with grub2-mkimage:
>
> https://www.theforeman.org/2016/09/new-post.html
>
> LZ
>
> --
> 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.
>
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] dhcp filename option for pxeboot of Power PC architecture

2017-09-01 Thread Lukas Zapletal
Is this non-Red Hat OS? I mean the system that serves the DHCP/TFTP?

> [root@srv-install grub2]# ln -s /var/lib/tftpboot/core.elf   grubppc64le.efi

TFTP runs in chroot, never do absolute symlinks, only relative. Not
sure if this is same for non-RH OS tho.

> Aug 31 17:47:54 srv-install in.tftpd[3851]: RRQ from 172.16.2.207 filename 
> /grub2/pxelinux.cfg/01-70-e2-84-14-1c-13

This is weird, the path should be /grub2.

Where this core.elf comes from? Can you try grubppc64le.efi from
foreman-bootloaders package? We don't yet have debian packages, you
can just unpack upstream tarball here:

http://downloads.theforeman.org/foreman-bootloaders/

If that fails, try to build core.elf. yourself with grub2-mkimage:

https://www.theforeman.org/2016/09/new-post.html

LZ

-- 
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] Foreman discovery image issue with UEFI client hosts

2017-08-31 Thread Lukas Zapletal
Sorry please remove the test

if [ -f "$configfile" ]; then
  source "$configfile"
fi

to

source "$configfile"

It was not working properly. Then watch system journal and boot the
file, paste what Grub2 was searching for.

On Wed, Aug 30, 2017 at 2:24 PM, Mrinmoy Acharya
<mrinmoyacha...@gmail.com> wrote:
> Hi Lukas,
>
> Thanks alot for your help.
>
> Following is my currentgrub2/grub.cfg  edited  after checking the github
> link   however, after EFI boot the screen i am geeting is a black grub
> prompt screenPlease let me know which line to correct.
>
> =
>
> [root@foreman grub2]# cat grub.cfg
> insmod regexp
> set net_pxe_mac=$net_default_mac
>  regexp --set=1:m1 --set=2:m2 --set=3:m3 --set=4:m4 --set=5:m5 --set=6:m6
> '^([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})'
> "$net_default_mac"
>  mac=${m1}-${m2}-${m3}-${m4}-${m5}-${m6}
>  configfile=/grub2/grub.cfg-01-$mac
> if [ -f "$configfile" ]; then
>   source "$configfile"
> fi
>
>  <%= snippet "pxegrub2_chainload" %>
> =======
>
>
>
>
>
> On Tuesday, August 29, 2017 at 3:30:55 PM UTC+5:30, Lukas Zapletal wrote:
>>
>> What is the error message in the VM again?
>>
>> This is caused by
>>
>> commit 0363223abbb14a53771181062cc37d94fd3c4b4e
>> Author: Pavel Matěja <lemr...@users.noreply.github.com>
>> AuthorDate: Wed Jun 7 13:05:36 2017 +0200
>> Commit: Lukáš Zapletal <lz...@redhat.com>
>> CommitDate: Wed Jun 7 13:05:36 2017 +0200
>>
>> Include grub.cfg-01-$mac files in global template (#393)
>>
>> because GRUB2 on Debian does not include them automatically.
>>
>> Can you try this:
>>
>> https://github.com/theforeman/community-templates/pull/417
>>
>> That should help.
>>
>>
>> On Mon, Aug 28, 2017 at 3:31 PM, Mrinmoy Acharya
>> <mrinmoy...@gmail.com> wrote:
>> > Hi Lukas,
>> >
>> > Thanks for the response. Following are the answers:
>> >
>> > 1.  grub2-tools-2.02-0.44.el7.centos.x86_64
>> > grub2-efi-2.02-0.44.el7.centos.x86_64
>> > grub2-2.02-0.44.el7.centos.x86_64
>> > grub2-efi-modules-2.02-0.44.el7.centos.x86_64
>> >
>> > 2.  [root@foreman grub2]# cat grub.cfg
>> > insmod regexp
>> >
>> > set net_pxe_mac=$net_default_mac
>> > regexp --set=1:m1 --set=2:m2 --set=3:m3 --set=4:m4 --set=5:m5 --set=6:m6
>> >
>> > '^([0-9a-f]{1,2})\:([0-9a-f]{1,2})\:([0-9a-f]{1,2})\:([0-9a-f]{1,2})\:([0-9a-f]{1,2})\:([0-9a-f]{1,2})'
>> > "$net_default_mac"
>> > mac_dashed=${m1}-${m2}-${m3}-${m4}-${m5}-${m6}
>> >
>> > mac_configfile=$prefix/grub.cfg-01-$mac_dashed
>> > source "$mac_configfile"
>> >
>> > 3. Please let me know how to collect this one as I am booting a VM in
>> > VMware
>> > workstation as UEFI client.
>> >
>> > Thanks and Regards,
>> >
>> > Mrinmoy
>> >
>> >
>> > On Monday, August 28, 2017 at 5:09:59 PM UTC+5:30, Lukas Zapletal wrote:
>> >>
>> >> Hello,
>> >>
>> >> 1) What version of grub2 have you deployed on your TFTP server? Which
>> >> distribution?
>> >>
>> >> 2) What is inside of /var/lib/tftpboot/grub2/grub.cfg config?
>> >>
>> >> 3) When you boot the host that does not work, find TFTP xfer messages
>> >> in system journal and paste them here.
>> >>
>> >> LZ
>> >>
>> >> On Sat, Aug 26, 2017 at 9:01 PM, Mrinmoy Acharya
>> >> <mrinmoy...@gmail.com> wrote:
>> >> > Dear friends,
>> >> >
>> >> > i have set up Foreman discovery Image 9.1 plugin in one VM
>> >> > workstation
>> >> > running Foreman server 1.15.0...i am trying to dicover UEFI hosts in
>> >> > Fooreman gui for further provisioning.
>> >> >
>> >> > issue: I have to bootup one client node (VM) in Legacy BIOS firmware
>> >> > mode to
>> >> > get the grub-mac.cfg file created under /var/lib/tftpboot/grub2 &
>> >> > then
>> >> > boot
>> >> > up the host again in UEFI mode to Discover the host in Foreman
>> >> > se

Re: [foreman-users] dhcp filename option for pxeboot of Power PC architecture

2017-08-31 Thread Lukas Zapletal
Hello,

with recent versions of Foreman (1.14+) you set PXELoader to Grub2 EFI
and then the filename will be grubppc64le.efi or grubppc64.efi
depending on endian.

Note the incorrect extension (PPC is not EFI compatible), we are
tracking this under http://projects.theforeman.org/issues/16706 and we
will rename this properly according to grub2-mknetdir:
http://projects.theforeman.org/issues/20815

So for you at the moment is best to create a (relative) symlink named
grubppc64.efi -> path/to/your/core.elf

LZ

On Wed, Aug 30, 2017 at 5:32 PM, Daniele Gregori (E4)
 wrote:
> Hi all,
> I have some IBM Power PC 8 server to install but I cannot find a way to 
> set the dhcp option:
>
> filename=core.elf
>
> In dhcp lease file to perform the correct pxe installation.
> What I have to change in the PXE template? Is there a variable to set to 
> define the “filename” ?
> Or there is a best practice to install PPC with Foreman?
>
> Thank you.
>
> Daniele
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Foreman discovery image issue with UEFI client hosts

2017-08-29 Thread Lukas Zapletal
What is the error message in the VM again?

This is caused by

commit 0363223abbb14a53771181062cc37d94fd3c4b4e
Author: Pavel Matěja <lemro...@users.noreply.github.com>
AuthorDate: Wed Jun 7 13:05:36 2017 +0200
Commit: Lukáš Zapletal <l...@redhat.com>
CommitDate: Wed Jun 7 13:05:36 2017 +0200

Include grub.cfg-01-$mac files in global template (#393)

because GRUB2 on Debian does not include them automatically.

Can you try this:

https://github.com/theforeman/community-templates/pull/417

That should help.


On Mon, Aug 28, 2017 at 3:31 PM, Mrinmoy Acharya
<mrinmoyacha...@gmail.com> wrote:
> Hi Lukas,
>
> Thanks for the response. Following are the answers:
>
> 1.  grub2-tools-2.02-0.44.el7.centos.x86_64
> grub2-efi-2.02-0.44.el7.centos.x86_64
> grub2-2.02-0.44.el7.centos.x86_64
> grub2-efi-modules-2.02-0.44.el7.centos.x86_64
>
> 2.  [root@foreman grub2]# cat grub.cfg
> insmod regexp
>
> set net_pxe_mac=$net_default_mac
> regexp --set=1:m1 --set=2:m2 --set=3:m3 --set=4:m4 --set=5:m5 --set=6:m6
> '^([0-9a-f]{1,2})\:([0-9a-f]{1,2})\:([0-9a-f]{1,2})\:([0-9a-f]{1,2})\:([0-9a-f]{1,2})\:([0-9a-f]{1,2})'
> "$net_default_mac"
> mac_dashed=${m1}-${m2}-${m3}-${m4}-${m5}-${m6}
>
> mac_configfile=$prefix/grub.cfg-01-$mac_dashed
> source "$mac_configfile"
>
> 3. Please let me know how to collect this one as I am booting a VM in VMware
> workstation as UEFI client.
>
> Thanks and Regards,
>
> Mrinmoy
>
>
> On Monday, August 28, 2017 at 5:09:59 PM UTC+5:30, Lukas Zapletal wrote:
>>
>> Hello,
>>
>> 1) What version of grub2 have you deployed on your TFTP server? Which
>> distribution?
>>
>> 2) What is inside of /var/lib/tftpboot/grub2/grub.cfg config?
>>
>> 3) When you boot the host that does not work, find TFTP xfer messages
>> in system journal and paste them here.
>>
>> LZ
>>
>> On Sat, Aug 26, 2017 at 9:01 PM, Mrinmoy Acharya
>> <mrinmoy...@gmail.com> wrote:
>> > Dear friends,
>> >
>> > i have set up Foreman discovery Image 9.1 plugin in one VM workstation
>> > running Foreman server 1.15.0...i am trying to dicover UEFI hosts in
>> > Fooreman gui for further provisioning.
>> >
>> > issue: I have to bootup one client node (VM) in Legacy BIOS firmware
>> > mode to
>> > get the grub-mac.cfg file created under /var/lib/tftpboot/grub2 & then
>> > boot
>> > up the host again in UEFI mode to Discover the host in Foreman server.
>> >
>> >   I also delete the discovered host entry in the foreman gui
>> > after
>> > the bios bootwhich gets created again after the UEFI boot.
>> >
>> >   If i rather boot up the node directly in UEFI
>> > modegrub-mac.cfg
>> > is not created & the client is stuck in a grub shell...please suggest
>> > how to
>> > discover host first time itself during the UEFI  client boot.
>> >
>> >  I am using VMware workstation for my testings
>> >
>> > thanks in advance.
>> >
>> > --
>> > 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-user...@googlegroups.com.
>> > To post to this group, send email to forema...@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/foreman-users.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Later,
>>   Lukas @lzap Zapletal



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] No facts in Json input for hooks after foreman discovery

2017-08-22 Thread Lukas Zapletal
Hello,

facts are not reported via hooks.

LZ

On Mon, Aug 21, 2017 at 4:37 PM,   wrote:
> Hello,
>
> The issue is that -> i dont see facts in input json after foreman discovers
> a VM/baremetal.
>
> This is the workflow that i am trying with hooks and foreman discovery
>
> VM/baremetal gets discovered -> JSON input to hooks -> Hooks use the facts
> from JSON input to add more facts from CMDB -> Facts get uploaded to
> foreman.
>
> I have created the following hooks:
>
> /usr/share/foreman/config/hooks/host/discovered/after_create/10-logger.py
>
> ls /usr/share/foreman-community/hooks/
> functions.py   functions.pyc  __init__.py
>
> The scripts just get the input json and try to output the json to temp
> directory, to help me understand the structure.
> However - I dont see facts or any other useful information during input
> json.
>
> {
> "id": 22,
> "name": "mac00163e5426c9",
> "last_compile": null,
> "last_report": null,
> "updated_at": "2017-08-18T20:13:44.058Z",
> "created_at": "2017-08-18T20:13:44.058Z",
> "root_pass": null,
> "architecture_id": null,
> "operatingsystem_id": null,
> "environment_id": null,
> "ptable_id": null,
> "medium_id": null,
> "build": false,
> "comment": null,
> "disk": null,
> "installed_at": null,
> "model_id": null,
> "hostgroup_id": null,
> "owner_id": null,
> "owner_type": null,
> "enabled": true,
> "puppet_ca_proxy_id": null,
> "managed": false,
> "use_image": null,
> "image_file": null,
> "uuid": null,
> "compute_resource_id": null,
> "puppet_proxy_id": null,
> "certname": null,
> "image_id": null,
> "organization_id": null,
> "location_id": null,
> "otp": null,
> "realm_id": null,
> "compute_profile_id": null,
> "provision_method": null,
> "grub_pass": "",
> "global_status": 0,
> "lookup_value_matcher": null,
> "pxe_loader": null,
> "discovery_rule_id": null
> }
>
>
> The workaround that i will have to use to get facts is:
> 1. Extract the mac address from the name -> reformat it -> use that to query
> the id of the host with discovery api
> 2. Use the id to query the facts of that host.
>
> Do i have to follow the above workaround to get facts of the discovered
> system? or am i missing something?
> It would be so much easier, if i could just facts in the input json to the
> hook.
>
> I am using the following versions foreman and its plugins on CentOS7:
>
> tfm-rubygem-foreman_setup-5.0.0-1.fm1_13.el7.noarch
> foreman-release-1.15.3-1.el7.noarch
> foreman-installer-1.15.3-1.el7.noarch
> foreman-libvirt-1.15.3-1.el7.noarch
> foreman-postgresql-1.15.3-1.el7.noarch
> tfm-rubygem-foreman_hooks-0.3.14-1.fm1_15.el7.noarch
> foreman-selinux-1.15.3-1.el7.noarch
> foreman-debug-1.15.3-1.el7.noarch
> foreman-release-scl-3-1.el7.noarch
> tfm-rubygem-hammer_cli_foreman-0.10.2-1.el7.noarch
> tfm-rubygem-foreman_discovery-9.1.1-1.fm1_15.el7.noarch
> foreman-cli-1.15.3-1.el7.noarch
> tfm-rubygem-foreman_memcache-0.0.6-1.fm1_15.el7.noarch
> foreman-proxy-1.15.3-1.el7.noarch
> foreman-1.15.3-1.el7.noarch
>
> Thanks,
> Lohit
>
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Foreman 'Finish template' not executed

2017-08-18 Thread Lukas Zapletal
Well you can use finish template but you need to explicitly download
it at the end of your kickstart:

curl http://foreman/unattended/finish | bash -x

That's really it.

On Thu, Aug 17, 2017 at 2:50 PM, Costin Balan <balancosti...@gmail.com> wrote:
> Hello,
>
> Thanks for the feedback. What kind of template should I use then for my
> needs?
>
> Some post-installation configurations? Like DNS, network, Proxy etc..?
>
> On Thursday, August 17, 2017 at 2:14:32 PM UTC+3, Lukas Zapletal wrote:
>>
>> Hello,
>>
>> finish template only triggers when compute_attributes.present? &&
>> image_build? && !image.try(:user_data)
>>
>> In other words, this is only meant for image based provisioning on
>> virt or clouds. You may want to file a RFE if there is none present
>> already.
>>
>> LZ
>>
>> On Thu, Aug 17, 2017 at 8:32 AM, Costin Balan <balanc...@gmail.com> wrote:
>> > Hello,
>> >
>> > I have a physical server which I'm trying to install with Foreman via
>> > PXE.
>> > The chosen OS is Ubuntu 17.04.
>> >
>> > In Foreman, this operating system has associated 3 templates:
>> >
>> > A PXELinux template type.
>> > A Provisioning template type.
>> > A Finish template type.
>> >
>> > When I start the Physical server in PXE, all goes well:
>> >
>> > It loads the Foreman discovery image
>> > After that, I provision the host from Foreman with Ubuntu 17.04 as an
>> > OS.
>> > It successfully fetches the needed files and starts installation
>> > During installation it successfully uses the Provisioning template I
>> > provided for various configurations (partitioning, language selection,
>> > user
>> > creation etc).
>> > After the installation the 'Finish template' will NOT be run (I don't
>> > know
>> > why). This template has the network, DNS, Proxy and other configurations
>> > which are supposed to be done after the OS Installation.
>> >
>> > What is the issue? Why is the 'Finish template' not run?
>> >
>> > Any help or guidance will be appreciated
>> >
>> > --
>> > 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-user...@googlegroups.com.
>> > To post to this group, send email to forema...@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/foreman-users.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Later,
>>   Lukas @lzap Zapletal



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Foreman 'Finish template' not executed

2017-08-17 Thread Lukas Zapletal
Hello,

finish template only triggers when compute_attributes.present? &&
image_build? && !image.try(:user_data)

In other words, this is only meant for image based provisioning on
virt or clouds. You may want to file a RFE if there is none present
already.

LZ

On Thu, Aug 17, 2017 at 8:32 AM, Costin Balan  wrote:
> Hello,
>
> I have a physical server which I'm trying to install with Foreman via PXE.
> The chosen OS is Ubuntu 17.04.
>
> In Foreman, this operating system has associated 3 templates:
>
> A PXELinux template type.
> A Provisioning template type.
> A Finish template type.
>
> When I start the Physical server in PXE, all goes well:
>
> It loads the Foreman discovery image
> After that, I provision the host from Foreman with Ubuntu 17.04 as an OS.
> It successfully fetches the needed files and starts installation
> During installation it successfully uses the Provisioning template I
> provided for various configurations (partitioning, language selection, user
> creation etc).
> After the installation the 'Finish template' will NOT be run (I don't know
> why). This template has the network, DNS, Proxy and other configurations
> which are supposed to be done after the OS Installation.
>
> What is the issue? Why is the 'Finish template' not run?
>
> Any help or guidance will be appreciated
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Foreman Host provisioning

2017-08-15 Thread Lukas Zapletal
Hello,

Foreman can talk to various virtualizations like libvirt or oVirt, but
not to Oracle Virtual VM unfortunately.

What you need to do is to create new VM and write down the VM MAC
address of the interface that is connected to network with Foreman. Do
not start it.

Then Create host, configure it and set MAC address of the provisioning
inteface, Submit. Then turn on your VM and it should start PXE booting
there.

There is one important thing - the virtual network (assuming you are
using that) must have DHCP turned off and your Foreman DHCP and TFTP
server must be configured and enabled responding to DHCP/PXE requests
on that network. I suggest you to create "Isolated virtual network"
for that purpose, or it can be NAT but make sure there is no Oracle
DHCP running there.

LZ

On Sat, Aug 12, 2017 at 5:50 PM, Phani Kumar
 wrote:
> Hi Team
>
> I am new to Foreman
>
> Clearly understood the reporting and Configuration.
> But not clear on provisioning  and I need help or link to documentation.
>
> What I did is till now .. I installed foreman on Oracle Virtuval machine VM
> and trying to provisioning a new VM from the foreman VM using bare metal
>
> I did all steps to create a new VM from host section as per documentation
> but its showing always pending for installation   since two days. and I
> restarted the foreman machine also. But no luck.
>
> Can you redirect me to right direction.
>
> Some of other questions.. If I am going to  provisioning a new host/VM..
> will it automatically creates new VM .. how this will work.. or do i need to
> create a VM and give the mac address and ip details while creating.
>
> Can you please help me here?
>
>
>
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Re: DHCP issues - UNABLE TO SAVE: Create DHCP Settings task failed

2017-08-15 Thread Lukas Zapletal
> [{"network":"192.168.196.0.0","netmask":"255.255.255.0","options":{"range":["192.168.0.201","192.168.0.254"]}}]

This means DHCP proxy module now sees your network but I do not
understand why it reads non-sense:

192.168.196.0.0

It should be:

192.168.0.0

Have you manually edited this line? Show me your "subnets" declaration
in dhcpd.conf again.

Also what is your Subnet definition in Foreman? Verify your address,
netmask and reservation match what you have in dhcpd.conf. The range
is recommended to be set outside of your DHCP pool.

LZ

On Tue, Aug 15, 2017 at 8:30 AM, Michal Hagara  wrote:
> Anyone?
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Re: DHCP issues - UNABLE TO SAVE: Create DHCP Settings task failed

2017-08-11 Thread Lukas Zapletal
Hello,

the subnets in dhcp.yml look suspicious, why you have them there? Also
these are not valid subnet addresses if I am not mistaken. Delete,
restart foreman-proxy.

Before you re-test verify that foreman-proxy see all subnet
definitions in dhcpd.conf, that would be:

curl -kvs --cert /etc/foreman/client_cert.pem --key
/etc/foreman/client_key.pem --cacert /etc/foreman/proxy_ca.pem
https://$(hostname):9090/dhcp

Not sure if you have cert paths right, if you change

:enabled: https

to

:enabled: true

and restart, then you can simply hit http endpoint:

curl http://$(hostname):9090/dhcp

LZ

On Fri, Aug 11, 2017 at 10:57 AM, Michal Hagara  wrote:
>
> duplicate of:
> https://groups.google.com/forum/#!topic/foreman-users/tHk4vS2aEws
>
>
> Im sorry for that!
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] iPXE Global Default

2017-08-10 Thread Lukas Zapletal
Conor,

to be honest, I am really not sure what you are trying to do. We do
have some iPXE support in Foreman, but this is mostly limited to iPXE
template type, so you can use Foreman to generate its contents. If
your intention is to have Foreman to supply custom DHCP filename
option (e.g. http:/somehost/my/ipxe) this is not supported.

LZ

On Thu, Aug 10, 2017 at 12:22 PM, Conor Mc Garvey  wrote:
> Hi,
>
> I'm looking to use an iPXE script delivered over HTTP as my global default.
> This is to make use of the "3 state boot" in pure iPXE.
>
> http://projects.theforeman.org/projects/foreman/wiki/3_state_boot
>
> Known to Foreman and in Build mode
>
> A MAC-specific PXE file is written (OS-specific installer template)
>
> Known to Foreman and not in Build mode
>
> A MAC-specific PXE file is written (Global PXE Localboot template)
>
> Unknown to Foreman
>
> The global default PXE file is used (PXE Default File template)
>
>
>
> I need to be able to provide a default file, over HTTP. Which is an iPXE
> menu. And also files based on MAC, for discovered hosts.
>
> Basically what is now provided in SysLinux/PXELinux, GRUB, GRUB2 now.
>
> Is this possible in foreman now?
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Foreman DB locks

2017-08-01 Thread Lukas Zapletal
I am shooting in the dark, but we have this cleanup cron job:

# Expire old reports
30 7 * * *  foreman/usr/sbin/foreman-rake reports:expire
>>/var/log/foreman/cron.log 2>&1

It runs daily, so modify it to run weekly perhaps or schedule it into
some quiet period if you have any as an initial workaround.

Now, note the above command runs in a separate process, check logs and
try to monitor that and measure how fast it cleans up old reports.
While the reports is expiring, it blocks all hosts which are checking
in. If this takes 10 minutes, then you will encounter lots of requests
enquen

If you confirm my suspicion, the solution would be perhaps to break up
record deletion into smaller batches (e.g. 1k records at one time),
perhaps with an extra 100ms delay so requests are not blocked (but the
expiration process will last longer). It would be good idea to test
performance and perhaps set it to expire on a weekly basis rather than
daily.

Can you tell how many config reports (and associated log lines,
messages and sources) do you expire every day? This should be in
cron.log file.

On Mon, Jul 24, 2017 at 5:47 PM, Chris Baldwin  wrote:
> Hi,
>
> We are seeing some DB locking issues during normal usage. I was hoping to
> get some pointers on what to look at to try and solve this/decrease the
> number of locks.
>
> We have 8 live Foreman 1.12 servers (each with 6 passenger instances) with
> 35k+ active nodes. I'm using Foreman as a Puppet 3.8 ENC, with a mix of 30
> or 60 minute puppet run intervals and all the logs being stored in Foreman.
> We're using postgresql94 for the DB on a 4 core/16GB RAM VM (single DB
> instance). All of this is running on RHEL6.6.
>
> What am I seeing? 200-300 locks at peak times, usually when a report is
> being run. Outside of that, we seem to hover at 100-ish locks.
> What have I tried? We have found that adding more active Foreman servers (or
> passenger instances) increases the number of locks. We have found that
> reducing the number of Foreman servers (or passenger instances) results in
> Puppet agent timeouts.
> What is causing the locks?
>
> Running this command (from: https://wiki.postgresql.org/wiki/Lock_Monitoring
> ):
> myforemandb=> SELECT blocked_locks.pid AS blocked_pid,
> myforemandb->  blocked_activity.usename  AS blocked_user,
> myforemandb->  blocking_locks.pid AS blocking_pid,
> myforemandb->  blocking_activity.usename AS blocking_user,
> myforemandb->  blocked_activity.queryAS blocked_statement,
> myforemandb->  blocking_activity.query   AS
> current_statement_in_blocking_process,
> myforemandb->  blocked_activity.application_name AS
> blocked_application,
> myforemandb->  blocking_activity.application_name AS
> blocking_application
> myforemandb->FROM  pg_catalog.pg_locks blocked_locks
> myforemandb-> JOIN pg_catalog.pg_stat_activity blocked_activity  ON
> blocked_activity.pid = blocked_locks.pid
> myforemandb-> JOIN pg_catalog.pg_locks blocking_locks
> myforemandb-> ON blocking_locks.locktype = blocked_locks.locktype
> myforemandb-> AND blocking_locks.DATABASE IS NOT DISTINCT FROM
> blocked_locks.DATABASE
> myforemandb-> AND blocking_locks.relation IS NOT DISTINCT FROM
> blocked_locks.relation
> myforemandb-> AND blocking_locks.page IS NOT DISTINCT FROM
> blocked_locks.page
> myforemandb-> AND blocking_locks.tuple IS NOT DISTINCT FROM
> blocked_locks.tuple
> myforemandb-> AND blocking_locks.virtualxid IS NOT DISTINCT FROM
> blocked_locks.virtualxid
> myforemandb-> AND blocking_locks.transactionid IS NOT DISTINCT FROM
> blocked_locks.transactionid
> myforemandb-> AND blocking_locks.classid IS NOT DISTINCT FROM
> blocked_locks.classid
> myforemandb-> AND blocking_locks.objid IS NOT DISTINCT FROM
> blocked_locks.objid
> myforemandb-> AND blocking_locks.objsubid IS NOT DISTINCT FROM
> blocked_locks.objsubid
> myforemandb-> AND blocking_locks.pid != blocked_locks.pid
> myforemandb->
> myforemandb-> JOIN pg_catalog.pg_stat_activity blocking_activity ON
> blocking_activity.pid = blocking_locks.pid
> myforemandb->WHERE NOT blocked_locks.GRANTED;
>
> Gives me a wall of text that looks like:
>
>  blocked_pid | blocked_user | blocking_pid | blocking_user |
> blocked_statement | current_statement_in_blocking_process |
> blocked_application | blocking_application
> 7500 | myforemanuser  | 7546 | myforemanuser   |
> DELETE FROM "logs" WHERE "logs"."report_id" IN (SELECT "reports"."id" FROM
> "reports" WHERE "reports"."type" IN ('ConfigReport') AND (reports.created_at
> < '2017-07-17 14:30:28')) | DELETE FROM "logs" WHERE "logs"."report_id" IN
> (SELECT "reports"."id" FROM "reports" WHERE "reports"."type" IN
> ('ConfigReport') AND (reports.created_at < '2017-07-17 14:32:13'))  |
> |
> 7503 | myforemanuser  | 7543 

Re: [foreman-users] Provision atomic host using satellite

2017-07-31 Thread Lukas Zapletal
To be honest, configuration management is not my domain, someone else
might know better. I don't know if puppet is even available for
Atomic, what could work is Ansible which ssh into hosts and has
self-hosting capability (if Python is installed which I assume it is).

Cockpit is not for automation, it's rather for ad-hoc configuration as I wrote.

LZ

On Mon, Jul 31, 2017 at 11:44 AM, Unix SA <d.josh...@gmail.com> wrote:
> Thanks,
>
> Basically i want to automate all the configuration, similar to RHEL7
> installation where i run puppet after installing OS so it configures my OS.
>
> Is that cloud-init is same ? I am not sure if i can configure all INFRA
> services usimg cockpit or add it in kickstart or other config managememt
> tools.
>
> Appriciate your time in helping me to understand this concept of
> customization in automic.
>
> Thanks,
> DJ
>
> On 31-Jul-2017 3:06 PM, "Lukas Zapletal" <l...@redhat.com> wrote:
>
> Hello, glad to hear you had it working.
>
> Atomic is essentially a RHEL with some volumes mounted as read-only,
> excluding /etc or /var. So you can configure all things the usual way
> - if you prefer by modifying /etc configuration files. There are some
> special things to do, for example configuring Docker and storage for
> it (/etc/sysconfig/docker-storage-setup).
>
> Atomic includes nice ad-hoc configuration management interface called
> Cockpit, you can easily access it via your web browser and set all of
> the most important configuration values or directly start containers
> on it. For more info go to:
>
> https://access.redhat.com/articles/2772861
> https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_atomic_host/7/html-single/installation_and_configuration_guide/
> https://www.projectatomic.io/docs/quickstart/
>
> On Mon, Jul 31, 2017 at 11:09 AM, Unix SA <d.josh...@gmail.com> wrote:
>> Hi,
>>
>> it does work now, it works with > 7.3 OS, Thanks.
>>
>> One more thing i want to ask is, what is recommended way for doing post
>> configuration of Atomic host, for example DNS,NTP, authentication ..  can
>> anyone guide me on this please?
>>
>> I think we can not install puppet for doing post configuration.
>>
>> Thanks,
>> DJ
>>
>>
>> On Monday, 31 July 2017 13:44:43 UTC+5:30, Lukas Zapletal wrote:
>>>
>>> Dhaval, do you have a case opened?
>>>
>>> Are you using on-demand download policy for kickstart or ostree?
>>>
>>> Have you added both kickstart and ostree into the same content view
>>> which is in use?
>>>
>>> LZ
>>>
>>> On Thu, Jul 27, 2017 at 8:18 PM, Unix SA <d.jo...@gmail.com> wrote:
>>> > Hello,
>>> >
>>> > Is anyone using atomic to be provisioned via satellite 6.2.10 ?
>>> >
>>> > While provisioning i am getting this error " [atomic] ImportError:
>>> > cannot import name OSTree"
>>> >
>>> > My image tag is 7.3.2
>>> >
>>> > Anyone aware of this ? Also after successful provision do i need to
>>> > apply puppet configurarion to configure DNS,NTP and other stuffs how
>>> > puppet
>>> > works in that or what meathod is approprite to configure it.
>>> >
>>> > Thanks,
>>> > DJ
>>> >
>>> > --
>>> > 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-user...@googlegroups.com.
>>> > To post to this group, send email to forema...@googlegroups.com.
>>> > Visit this group at https://groups.google.com/group/foreman-users.
>>> > For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>
>>> --
>>> Later,
>>>   Lukas @lzap Zapletal
>
>
>
> --
> Later,
>   Lukas @lzap Zapletal
>
>



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Provision atomic host using satellite

2017-07-31 Thread Lukas Zapletal
Hello, glad to hear you had it working.

Atomic is essentially a RHEL with some volumes mounted as read-only,
excluding /etc or /var. So you can configure all things the usual way
- if you prefer by modifying /etc configuration files. There are some
special things to do, for example configuring Docker and storage for
it (/etc/sysconfig/docker-storage-setup).

Atomic includes nice ad-hoc configuration management interface called
Cockpit, you can easily access it via your web browser and set all of
the most important configuration values or directly start containers
on it. For more info go to:

https://access.redhat.com/articles/2772861
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_atomic_host/7/html-single/installation_and_configuration_guide/
https://www.projectatomic.io/docs/quickstart/

On Mon, Jul 31, 2017 at 11:09 AM, Unix SA <d.josh...@gmail.com> wrote:
> Hi,
>
> it does work now, it works with > 7.3 OS, Thanks.
>
> One more thing i want to ask is, what is recommended way for doing post
> configuration of Atomic host, for example DNS,NTP, authentication ..  can
> anyone guide me on this please?
>
> I think we can not install puppet for doing post configuration.
>
> Thanks,
> DJ
>
>
> On Monday, 31 July 2017 13:44:43 UTC+5:30, Lukas Zapletal wrote:
>>
>> Dhaval, do you have a case opened?
>>
>> Are you using on-demand download policy for kickstart or ostree?
>>
>> Have you added both kickstart and ostree into the same content view
>> which is in use?
>>
>> LZ
>>
>> On Thu, Jul 27, 2017 at 8:18 PM, Unix SA <d.jo...@gmail.com> wrote:
>> > Hello,
>> >
>> > Is anyone using atomic to be provisioned via satellite 6.2.10 ?
>> >
>> > While provisioning i am getting this error " [atomic] ImportError:
>> > cannot import name OSTree"
>> >
>> > My image tag is 7.3.2
>> >
>> > Anyone aware of this ? Also after successful provision do i need to
>> > apply puppet configurarion to configure DNS,NTP and other stuffs how puppet
>> > works in that or what meathod is approprite to configure it.
>> >
>> > Thanks,
>> > DJ
>> >
>> > --
>> > 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-user...@googlegroups.com.
>> > To post to this group, send email to forema...@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/foreman-users.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Later,
>>   Lukas @lzap Zapletal



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Provision atomic host using satellite

2017-07-31 Thread Lukas Zapletal
Dhaval, do you have a case opened?

Are you using on-demand download policy for kickstart or ostree?

Have you added both kickstart and ostree into the same content view
which is in use?

LZ

On Thu, Jul 27, 2017 at 8:18 PM, Unix SA  wrote:
> Hello,
>
> Is anyone using atomic to be provisioned via satellite 6.2.10 ?
>
> While provisioning i am getting this error " [atomic] ImportError: cannot 
> import name OSTree"
>
> My image tag is 7.3.2
>
> Anyone aware of this ? Also after successful provision do i need to apply 
> puppet configurarion to configure DNS,NTP and other stuffs how puppet works 
> in that or what meathod is approprite to configure it.
>
> Thanks,
> DJ
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] minor upgrade

2017-07-19 Thread Lukas Zapletal
You are not expected to do that, RPM packages do call db migration and
seed automatically, but I always recommend to run puppet on *noop*
mode to see the drift.

foreman-installer --scenario katello -v -n

LZ

On Wed, Jul 19, 2017 at 9:24 AM, Johan Loubser  wrote:
> Hello
>
> When doing minor upgrade (normal yum update on CentOS 7) do i need to do
> "foreman-installer --scenario katello --upgrade"
> And in specific case 3.4.2 to 3.4.3 (pulp upgrade 2.12 to 2.13)
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Create my own plugin using the example on the manual

2017-07-10 Thread Lukas Zapletal
Hello,

what exactly is your problem? Try to describe in more detail, what
you've provided is sparse. Assuming that you don't see your new plugin
on About page, you need to follow steps of adding the plugin into
Gemfile.local.rb as in
http://projects.theforeman.org/projects/foreman/wiki/How_to_Create_a_Plugin#Installing-the-plugin
and then you should see it.

LZ

On Wed, Jul 5, 2017 at 12:08 PM, Fairouz el ouazi
 wrote:
> HI ,
>
> i m new to foreman and i want to create my own plugin so i start to read
> the
> http://projects.theforeman.org/projects/foreman/wiki/How_to_Create_a_Plugin
> . while the installation i did the bundle install but when i see type (rails
> server ) on my foreman GUI and can't see any new plugin ??
>
> Please help !!
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Re: Domain is not set from a host group

2017-06-29 Thread Lukas Zapletal
Hey,

I hope it solved all your problems, I will work on docs this week.

LZ

On Tue, Jun 20, 2017 at 7:01 PM, Ido Kaplan <kaplan@gmail.com> wrote:
> I see now that 9.1.1-1 version was released - thank you!
> I recommend to update also plugin documentation.
>
> On Tuesday, June 20, 2017 at 6:20:46 PM UTC+3, Ido Kaplan wrote:
>>
>> Not sure that I understand your reply.
>> Is discovery plugin was released officially today?
>> With a patch that solving the domain host group issue?
>>
>> Ido
>>
>>
>> On 19 Jun 2017, at 23:56, Lukas Zapletal <l...@redhat.com> wrote:
>>
>> Scratchbuild link (built against 1.16-develop but that should not be
>> problem for a quick test):
>>
>>
>> http://koji.katello.org/kojifiles/work/tasks/7487/7487/tfm-rubygem-foreman_discovery-9.1.1-1.fm1_16.git.9.bd67811.git.9.bd67811.el7.noarch.rpm
>>
>> LZ
>>
>> On Mon, Jun 19, 2017 at 10:09 PM, Ido Kaplan <kaplan@gmail.com> wrote:
>>
>> Nice!, Foreman is loading and it looks like that domain is set correctly
>>
>> from a host group.
>>
>> I will wait for the fix and will execute some more tests again.
>>
>> Where can I subscribe to hear that foreman discovery 9.1.0 was released?
>>
>>
>> On Monday, June 19, 2017 at 10:00:57 PM UTC+3, Michael Moll wrote:
>>
>>
>> Hi,
>>
>>
>> On Mon, Jun 19, 2017 at 09:54:39AM -0700, Ido Kaplan wrote:
>>
>> Foreman is not loading after installing the RPM.
>>
>> Web application could not be started
>>
>>
>> uninitialized constant ApplicationRecord (NameError)
>>
>>
>> Please *revert* the following patch: https://git.io/vQvRe
>>
>>
>> As it turns out, foreman_docivery 9.1.0 is not compatible with Foreman
>>
>> 1.15.x as-is, we're working on a fix now that should be out tomorrow.
>>
>>
>> Regards
>>
>> --
>>
>> Michael Moll
>>
>>
>> --
>>
>> 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.
>>
>>
>>
>>
>> --
>> Later,
>>  Lukas @lzap Zapletal
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Foreman users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/foreman-users/qEKYMNDhq1w/unsubscribe.
>> To unsubscribe from this group and all its topics, 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.
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] execute hook script before template render

2017-06-29 Thread Lukas Zapletal
You can turn off safemode and then you have full Ruby interpreter at
your hands in your template, just do <% anything_you_want_here %>, so
you can make HTTP request or call an external script to generate the
token for you (just make sure you update SELinux policy if on Red Hat
to allow this). You can also install additional gems.

Cleaner way is to write your own plugin, we have an example template,
generator and docs. Such a plugin can add a new function into ERB
(even in safemode) that will do the job for you. Example how to do
this is here:

http://projects.theforeman.org/projects/foreman/wiki/How_to_Create_a_Plugin#Extend-safemode-access

Hooks is not the way to do it. Good luck and share your plugin with us!

On Wed, Jun 21, 2017 at 2:18 PM, Adam Winberg  wrote:
> Hi all,
>
> I want to place an encrypted one-time-password in my provisioning template.
> This is then used to request a certificate at install time. This OTP is only
> valid for 1 hour, so my idea was to create a host parameter containing the
> OTP right before the provisioning template is requested/rendered, and let
> the template get the OTP from that host parameter.
>
> This is bare-metal installations so I cant set the OTP parameter in Foreman
> at host creation since the actual OS install might happen some time later,
> and then the OTP is invalid.
>
> Q1: Is there any way to run a foreman hook script at the time of provision
> template rendering?
> Q2: Any other suggestions on how to do this?
>
> Regards
> Adam
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] UEFI PXEBoot not downloading config file

2017-06-29 Thread Lukas Zapletal
Hello,

I just found that our Preseed template has incorect kind associated,
filed bug and fixed it, we will push an update for 1.15:

http://projects.theforeman.org/issues/20143

In the meantime you can fix this by executing this:

foreman-rake console
> kind = TemplateKind.find_by_name(:PXEGrub2)
> tmpl = ProvisioningTemplate.unscoped.find_by_name("Preseed default PXEGrub2")
> tmpl.update_attribute(:template_kind, kind) if tmpl && kind
> exit

And then you can associate it correctly with your OS.

On Wed, Jun 21, 2017 at 10:10 AM, Stanisław Jakiel
<stanislaw.jak...@gmail.com> wrote:
> I've tried loaders from:
> http://downloads.theforeman.org/foreman-bootloaders/
> by putting them under tftp dir
>
> And they behave the same way as stock grubx64.efi from foreman-installer -
> so no luck
> I'll give it a shot with some qemu uefi env.
>
> Please advise about previous question about templates.
>
> Regards
>
> On Monday, June 19, 2017 at 9:27:36 AM UTC+2, Lukas Zapletal wrote:
>>
>> Foreman now supports Grub1, Grub2 and PXELinux templates, you can pick
>> anything you want. Note that Grub1 does not support UEFI.
>>
>> If you install Smart Proxy on a system where Grub1 or Grub2 is
>> available, we generate the bootloader via the installer using mkgrub
>> command. Usually only one of these grubs are available depending on
>> your OS version (e.g. RHEL6 = Grub1, RHEL7 = Grub2, the same for
>> Debians etc). If you want to use let's say PXELinux EFI, you need to
>> deploy pxelinux.efi file yourself. The following snippet comes from
>> our docs:
>>
>> ~~~
>> When creating a new Host, the PXE Loader option must be selected in
>> order to pass the correct DHCP filename option to the client. One
>> option out of the following must be chosen:
>>
>> PXELinux BIOS (loads pxelinux.0 filename from TFTP)
>> PXELinux UEFI (loads pxelinux.efi filename from TFTP)
>> PXEGrub UEFI (loads grub/bootx64.efi filename from TFTP)
>> PXEGrub UEFI SecureBoot (loads grub/shim.efi filename from TFTP)
>> PXEGrub2 UEFI (loads grub2/grubx64.efi filename from TFTP)
>> PXEGrub2 UEFI SecureBoot (loads grub2/shim.efi filename from TFTP)
>> None - no filename passed (e.g. for HTTP booting via iPXE)
>>
>> Grub filenames are different for each individual architecture
>> associated with the Host:
>>
>> grub/bootia32.efi (for Intel named "i*86" where * can be any character)
>> grub/bootx64.efi (for Intel named "x86-64")
>> grub2/grubia32.efi (for Intel named "i*86" where * can be any character)
>> grub2/grubx64.efi (for Intel named "x86-64")
>> grub2/grubaa64.efi (for ARM 64 named either "aa64" or "aarch64")
>> grub2/grubppc64.efi (for IBM POWER named "ppc64”)
>> grub2/grubppc64le.efi (for IBM POWER Little Endian named "ppc64le")
>> grub2/grubXYZ.efi (for arbitrary Architecture named "XYZ")
>>
>> Foreman installer only installs pxelinux.0 and grub2/grubx64.efi (if
>> grub2 is available). In order to boot systems via other loaders like
>> PXELinux EFI or Grub 1 (legacy), deploy the required bootloader files
>> in the TFTP directory.
>>
>> Some operating systems use a “shim” loader for SecureBoot (e.g. Red
>> Hat Enterprise Linux and clones). To use SecureBoot with an operating
>> system that does not use a shim chainloader, make a copy of the signed
>> EFI loader named shim.efi or make a symlink in order to do secure
>> boot.
>> ~~~
>>
>> Now, initially I've implemented this on Red Hat systems and I haven't
>> realized that Red Hat patches Grub2 in order to read configuration
>> files according to MAC address. Debian family does not do that, this
>> results in only reading grub.cfg which does not work. There is one
>> trick you can do in your grub.cfg (this is for Grub2):
>>
>> regexp --set=1:m1 --set=2:m2 --set=3:m3 --set=4:m4 --set=5:m5
>> --set=6:m6
>> '^([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})'
>> "$net_default_mac"
>> mac=${m1}-${m2}-${m3}-${m4}-${m5}-${m6}
>> configfile=/grub2/grub.cfg-01-$mac
>> source "$configfile"
>>
>> We have recently patched our installer to set this for you by default
>> if you are on non-redhat system so starting from 1.15 this should be
>> in.
>>
>> Second option is to use foreman-bootloaders package which we plan to
>> provide in our repositories which ships builds from RHEL and Fedora.
>> This way you will have all bootloaders installed no ma

Re: [foreman-users] Network provisioning failing

2017-06-28 Thread Lukas Zapletal
Hey,

can you provide more details? Extract the boot configuration files
from the ISO and attach, pastebin output of host detail CLI or
screenshots of the host itself including NIC screen.

LZ

On Tue, Jun 27, 2017 at 6:57 PM, Renig Tra  wrote:
> Hi all,
>
> I'm trying to install a host with CentOS 7.3 using foreman 1.15.0 but when
> booting using a "Full image", the specified network configuration created in
> the host is not applied because a new network interface called idrac has
> appeared with the same IP configured for the real network interface em1. Do
> you know what could be the problem? In the host network configuration there
> is only one interface configured, however the boot process it seems is
> trying to configured all the physical interfaces with the same IP.
>
> Thanks
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] UEFI PXEBoot not downloading config file

2017-06-19 Thread Lukas Zapletal
You want to associate "Preseed default PXEGrub2" for debian distros or
"Kickstart default PXEGrub2" for redhat distros not the "default" or
"local boot" ones, that is not correct.

Default - template that renders to default menu (grub.cfg)
Local boot - template used when host is in production mode (local from HDD/SSD)

I don't understand what you mean by locally available, but it is
supposed to download this from TFTP. I haven't created this trick but
I've seen this on various mailing lists as a workaround. You don't
need this if you use foreman-bootloaders-redhat package anyway, that
will work for sure plus you get also SecureBoot support (Debian did
not support it until yesterday - Debian 9).

LZ

On Mon, Jun 19, 2017 at 5:46 PM, Stanisław Jakiel
<stanislaw.jak...@gmail.com> wrote:
> 3) To be honest I don't understand this grub.cfg trick. It looks like
> sourcing locally available grub.cfg-01-MAC whereas it should be downloaded
> from foreman's tftp.
> Only way for this to work would be regenerating grubx64.efi on each host
> creation (with this grub.cfg-01-MAC embedded) but how do you support
> multiple hosts provisioning then?
>
> On Monday, June 19, 2017 at 9:27:36 AM UTC+2, Lukas Zapletal wrote:
>>
>> Foreman now supports Grub1, Grub2 and PXELinux templates, you can pick
>> anything you want. Note that Grub1 does not support UEFI.
>>
>> If you install Smart Proxy on a system where Grub1 or Grub2 is
>> available, we generate the bootloader via the installer using mkgrub
>> command. Usually only one of these grubs are available depending on
>> your OS version (e.g. RHEL6 = Grub1, RHEL7 = Grub2, the same for
>> Debians etc). If you want to use let's say PXELinux EFI, you need to
>> deploy pxelinux.efi file yourself. The following snippet comes from
>> our docs:
>>
>> ~~~
>> When creating a new Host, the PXE Loader option must be selected in
>> order to pass the correct DHCP filename option to the client. One
>> option out of the following must be chosen:
>>
>> PXELinux BIOS (loads pxelinux.0 filename from TFTP)
>> PXELinux UEFI (loads pxelinux.efi filename from TFTP)
>> PXEGrub UEFI (loads grub/bootx64.efi filename from TFTP)
>> PXEGrub UEFI SecureBoot (loads grub/shim.efi filename from TFTP)
>> PXEGrub2 UEFI (loads grub2/grubx64.efi filename from TFTP)
>> PXEGrub2 UEFI SecureBoot (loads grub2/shim.efi filename from TFTP)
>> None - no filename passed (e.g. for HTTP booting via iPXE)
>>
>> Grub filenames are different for each individual architecture
>> associated with the Host:
>>
>> grub/bootia32.efi (for Intel named "i*86" where * can be any character)
>> grub/bootx64.efi (for Intel named "x86-64")
>> grub2/grubia32.efi (for Intel named "i*86" where * can be any character)
>> grub2/grubx64.efi (for Intel named "x86-64")
>> grub2/grubaa64.efi (for ARM 64 named either "aa64" or "aarch64")
>> grub2/grubppc64.efi (for IBM POWER named "ppc64”)
>> grub2/grubppc64le.efi (for IBM POWER Little Endian named "ppc64le")
>> grub2/grubXYZ.efi (for arbitrary Architecture named "XYZ")
>>
>> Foreman installer only installs pxelinux.0 and grub2/grubx64.efi (if
>> grub2 is available). In order to boot systems via other loaders like
>> PXELinux EFI or Grub 1 (legacy), deploy the required bootloader files
>> in the TFTP directory.
>>
>> Some operating systems use a “shim” loader for SecureBoot (e.g. Red
>> Hat Enterprise Linux and clones). To use SecureBoot with an operating
>> system that does not use a shim chainloader, make a copy of the signed
>> EFI loader named shim.efi or make a symlink in order to do secure
>> boot.
>> ~~~
>>
>> Now, initially I've implemented this on Red Hat systems and I haven't
>> realized that Red Hat patches Grub2 in order to read configuration
>> files according to MAC address. Debian family does not do that, this
>> results in only reading grub.cfg which does not work. There is one
>> trick you can do in your grub.cfg (this is for Grub2):
>>
>> regexp --set=1:m1 --set=2:m2 --set=3:m3 --set=4:m4 --set=5:m5
>> --set=6:m6
>> '^([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})'
>> "$net_default_mac"
>> mac=${m1}-${m2}-${m3}-${m4}-${m5}-${m6}
>> configfile=/grub2/grub.cfg-01-$mac
>> source "$configfile"
>>
>> We have recently patched our installer to set this for you by default
>> if you are on non-redhat system so starting from 1.15 this should be
>> in.

Re: [foreman-users] Re: Domain is not set from a host group

2017-06-19 Thread Lukas Zapletal
Scratchbuild link (built against 1.16-develop but that should not be
problem for a quick test):

http://koji.katello.org/kojifiles/work/tasks/7487/7487/tfm-rubygem-foreman_discovery-9.1.1-1.fm1_16.git.9.bd67811.git.9.bd67811.el7.noarch.rpm

LZ

On Mon, Jun 19, 2017 at 10:09 PM, Ido Kaplan  wrote:
> Nice!, Foreman is loading and it looks like that domain is set correctly
> from a host group.
> I will wait for the fix and will execute some more tests again.
> Where can I subscribe to hear that foreman discovery 9.1.0 was released?
>
> On Monday, June 19, 2017 at 10:00:57 PM UTC+3, Michael Moll wrote:
>>
>> Hi,
>>
>> On Mon, Jun 19, 2017 at 09:54:39AM -0700, Ido Kaplan wrote:
>> > Foreman is not loading after installing the RPM.
>> > Web application could not be started
>> >
>> > uninitialized constant ApplicationRecord (NameError)
>>
>> Please *revert* the following patch: https://git.io/vQvRe
>>
>> As it turns out, foreman_docivery 9.1.0 is not compatible with Foreman
>> 1.15.x as-is, we're working on a fix now that should be out tomorrow.
>>
>> Regards
>> --
>> Michael Moll
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] UEFI PXEBoot not downloading config file

2017-06-19 Thread Lukas Zapletal
Foreman now supports Grub1, Grub2 and PXELinux templates, you can pick
anything you want. Note that Grub1 does not support UEFI.

If you install Smart Proxy on a system where Grub1 or Grub2 is
available, we generate the bootloader via the installer using mkgrub
command. Usually only one of these grubs are available depending on
your OS version (e.g. RHEL6 = Grub1, RHEL7 = Grub2, the same for
Debians etc). If you want to use let's say PXELinux EFI, you need to
deploy pxelinux.efi file yourself. The following snippet comes from
our docs:

~~~
When creating a new Host, the PXE Loader option must be selected in
order to pass the correct DHCP filename option to the client. One
option out of the following must be chosen:

PXELinux BIOS (loads pxelinux.0 filename from TFTP)
PXELinux UEFI (loads pxelinux.efi filename from TFTP)
PXEGrub UEFI (loads grub/bootx64.efi filename from TFTP)
PXEGrub UEFI SecureBoot (loads grub/shim.efi filename from TFTP)
PXEGrub2 UEFI (loads grub2/grubx64.efi filename from TFTP)
PXEGrub2 UEFI SecureBoot (loads grub2/shim.efi filename from TFTP)
None - no filename passed (e.g. for HTTP booting via iPXE)

Grub filenames are different for each individual architecture
associated with the Host:

grub/bootia32.efi (for Intel named "i*86" where * can be any character)
grub/bootx64.efi (for Intel named "x86-64")
grub2/grubia32.efi (for Intel named "i*86" where * can be any character)
grub2/grubx64.efi (for Intel named "x86-64")
grub2/grubaa64.efi (for ARM 64 named either "aa64" or "aarch64")
grub2/grubppc64.efi (for IBM POWER named "ppc64”)
grub2/grubppc64le.efi (for IBM POWER Little Endian named "ppc64le")
grub2/grubXYZ.efi (for arbitrary Architecture named "XYZ")

Foreman installer only installs pxelinux.0 and grub2/grubx64.efi (if
grub2 is available). In order to boot systems via other loaders like
PXELinux EFI or Grub 1 (legacy), deploy the required bootloader files
in the TFTP directory.

Some operating systems use a “shim” loader for SecureBoot (e.g. Red
Hat Enterprise Linux and clones). To use SecureBoot with an operating
system that does not use a shim chainloader, make a copy of the signed
EFI loader named shim.efi or make a symlink in order to do secure
boot.
~~~

Now, initially I've implemented this on Red Hat systems and I haven't
realized that Red Hat patches Grub2 in order to read configuration
files according to MAC address. Debian family does not do that, this
results in only reading grub.cfg which does not work. There is one
trick you can do in your grub.cfg (this is for Grub2):

regexp --set=1:m1 --set=2:m2 --set=3:m3 --set=4:m4 --set=5:m5
--set=6:m6 
'^([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})\:([[:xdigit:]]{1,2})'
"$net_default_mac"
mac=${m1}-${m2}-${m3}-${m4}-${m5}-${m6}
configfile=/grub2/grub.cfg-01-$mac
source "$configfile"

We have recently patched our installer to set this for you by default
if you are on non-redhat system so starting from 1.15 this should be
in.

Second option is to use foreman-bootloaders package which we plan to
provide in our repositories which ships builds from RHEL and Fedora.
This way you will have all bootloaders installed no matter if you are
on older or newer OS. Note it does not ship PXELinux EFI yet as there
is no stable release yet. We will add this later.

For more details read this chapter:
https://theforeman.org/manuals/1.15/index.html#4.4.3ProvisioningTemplates
and feel free to improve our docs if you think it's not clear. E.g.
the info about non-redhats would be nice to have there.

On Sat, Jun 17, 2017 at 5:12 PM, Stanisław Jakiel
 wrote:
> Hello,
>
> I've read some posts/issues about UEFI support for foreman:
>  - https://github.com/theforeman/foreman-bootloaders
>  - https://github.com/theforeman/community-templates/pull/346
>  - https://github.com/theforeman/puppet-foreman_proxy/pull/324
>  - http://projects.theforeman.org/issues/16654
>
> and to be honest I've no idea what is the status for PXEbooting Debian OSes
>
> First of all how to configure UEFI in foreman GUI?
>  - the OS is supposed to have PXEGrub2 template set or not?
>  - what is the meaning of PXE Loader dropdown in host creation screen? why
> PXELinux UEFI doesn't require grub template but grub(2) uefi does?
>  - as I'm using dnsmasq (DHCPProxy) I assume those two aforementioned
> options doesn't have any effect on me? I should handle dhcp config myself?
>
> For now lets assume I've configured it properly...
> My issue is following:
>
> The latest foreman comes with some grub2/grubx64.efi file and generates the
> grub2/grub.cfg-01-aa-bb-cc-dd-ee-ff which seems to be ok (for debian 8/9)
> The grub2/grubx64.efi filename is served properly by dnsmasq (ver. 2.67
> which is supposed to support UEFI)
>
> But when I use e.g. notebook with UEFI, disable secure boot and enable
> network boot, all what happens is:
>  - dhcp discover is sent, offers (one from DHCP server one from proxydhcp)

Re: [foreman-users] Re: Domain is not set from a host group

2017-06-16 Thread Lukas Zapletal
No ETA yet, you can use this scratchbuild it will work:
http://koji.katello.org/koji/taskinfo?taskID=6018

Report back if it fixes your issue.

LZ

On Tue, Jun 13, 2017 at 1:32 PM, Ido Kaplan  wrote:
> Ok, thank you for the update.
> Is there a fix for this issue?
> When it should be released?
>
>
> On Monday, June 12, 2017 at 9:16:37 AM UTC+3, Ido Kaplan wrote:
>>
>> Hi,
>>
>> Foreman version 1.14.3, Discovery plugin version 8.0.1.
>>
>> During provisioning a server with multiple interfaces, domain is not set
>> from a host group.
>> Error - Failed to save: Domain can't be blank, Interfaces.domain can't
>> find domain with this id
>> The same issue like this bug - http://projects.theforeman.org/issues/19445
>> Can you please advise?
>>
>> 2017-06-11 13:41:16 f825c503 [app] [I] Started GET
>> "/discovered_hosts/mac/edit?utf8=%E2%9C%93%5Bhostgroup_id%5D=1"
>> for 1.1.1.1 at 2017-06-11 13:41:16 +
>> 2017-06-11 13:41:16 f825c503 [app] [I] Processing by
>> DiscoveredHostsController#edit as HTML
>> 2017-06-11 13:41:16 f825c503 [app] [I]   Parameters: {"utf8"=>"✓",
>> "host"=>{"hostgroup_id"=>"1"}, "id"=>"mac"}
>> 2017-06-11 13:41:16 f825c503 [sql] [D]
>> ActiveRecord::SessionStore::Session Load (0.9ms)  SELECT  "sessions".* FROM
>> "sessions" WHERE "sessions"."session_id" = $1  ORDER BY "sessions"."id" ASC
>> LIMIT 1  [["session_id", "f825c5039243217a9989ad65570411fe"]]
>> 2017-06-11 13:41:16 f825c503 [sql] [D]   User Load (0.8ms)  SELECT
>> "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1  [["id", 3]]
>> 2017-06-11 13:41:16 f825c503 [app] [D] Setting current user thread-local
>> variable to admin
>> 2017-06-11 13:41:16 f825c503 [sql] [D]   AuthSource Load (0.7ms)  SELECT
>> "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."id" = $1 LIMIT 1
>> [["id", 1]]
>> 2017-06-11 13:41:16 f825c503 [sql] [D]   Host::Discovered Load (0.9ms)
>> SELECT  "hosts".* FROM "hosts" WHERE "hosts"."type" IN ('Host::Discovered')
>> AND "hosts"."id" = $1  ORDER BY hosts.created_at DESC LIMIT 1  [["id", 0]]
>> 2017-06-11 13:41:16 f825c503 [sql] [D]   Host::Discovered Load (1.0ms)
>> SELECT  "hosts".* FROM "hosts" WHERE "hosts"."type" IN ('Host::Discovered')
>> AND "hosts"."name" = $1  ORDER BY hosts.created_at DESC LIMIT 1  [["name",
>> "mac"]]
>> 2017-06-11 13:41:16 f825c503 [sql] [D]   Nic::Base Load (0.9ms)  SELECT
>> "nics".* FROM "nics" WHERE "nics"."host_id" = $1  ORDER BY
>> "nics"."identifier" ASC  [["host_id", 12]]
>> 2017-06-11 13:41:16 f825c503 [sql] [D](0.2ms)  BEGIN
>> 2017-06-11 13:41:16 f825c503 [sql] [D]   Subnet Load (0.7ms)  SELECT
>> "subnets".* FROM "subnets" WHERE "subnets"."id" = $1 AND "subnets"."type" =
>> $2  ORDER BY vlanid LIMIT 1  [["id", 1], ["type", "Subnet::Ipv4"]]
>> 2017-06-11 13:41:16 f825c503 [sql] [D]   Nic::Base Load (0.6ms)  SELECT
>> "nics".* FROM "nics" WHERE "nics"."ip" = $1  [["ip", "2.2.2.2"]]
>> 2017-06-11 13:41:16 f825c503 [sql] [D]   Nic::Base Load (0.6ms)  SELECT
>> "nics".* FROM "nics" WHERE "nics"."domain_id" IS NULL AND "nics"."name" = $1
>> [["name", "mac"]]
>> 2017-06-11 13:41:16 f825c503 [sql] [D] Using host queue
>> 2017-06-11 13:41:16 f825c503 [sql] [D] Using host queue
>> 2017-06-11 13:41:16 f825c503 [sql] [D] Using host queue
>> 2017-06-11 13:41:16 f825c503 [sql] [D] Using host queue
>> 2017-06-11 13:41:16 f825c503 [sql] [D]   Nic::Base Load (0.5ms)  SELECT
>> "nics".* FROM "nics" WHERE "nics"."ip" = $1  [["ip", "192.168.0.120"]]
>> 2017-06-11 13:41:16 f825c503 [sql] [D] Using host queue
>> 2017-06-11 13:41:16 f825c503 [sql] [D] Using host queue
>> 2017-06-11 13:41:16 f825c503 [sql] [D] Using host queue
>> 2017-06-11 13:41:16 f825c503 [sql] [D](0.4ms)  COMMIT
>> 2017-06-11 13:41:16 f825c503 [sql] [D]   Hostgroup Load (0.8ms)  SELECT
>> "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."title" = $1  ORDER BY
>> hostgroups.title LIMIT 1  [["title", "1"]]
>> 2017-06-11 13:41:16 f825c503 [sql] [D]   Hostgroup Load (0.9ms)  SELECT
>> "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."id" = $1  ORDER BY
>> hostgroups.title LIMIT 1  [["id", 1]]
>> 2017-06-11 13:41:16 f825c503 [sql] [D]   Hostgroup Load (1.0ms)  SELECT
>> "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."id" = $1  ORDER BY
>> hostgroups.title LIMIT 1  [["id", 1]]
>> 2017-06-11 13:41:16 f825c503 [sql] [D]   Architecture Load (0.7ms)  SELECT
>> "architectures".* FROM "architectures" WHERE "architectures"."id" = $1 LIMIT
>> 1  [["id", 1]]
>> 2017-06-11 13:41:16 f825c503 [sql] [D]   Operatingsystem Load (0.8ms)
>> SELECT  "operatingsystems".* FROM "operatingsystems" WHERE
>> "operatingsystems"."id" = $1  ORDER BY "operatingsystems"."title" ASC LIMIT
>> 1  [["id", 1]]
>> 2017-06-11 13:41:16 f825c503 [sql] [D]   Domain Load (0.7ms)  SELECT
>> "domains".* FROM "domains" WHERE "domains"."id" = $1  ORDER BY domains.name
>> LIMIT 1  [["id", 1]]
>> 2017-06-11 13:41:16 f825c503 [sql] [D]   Subnet Load (0.7ms)  SELECT
>> 

Re: [foreman-users] discovered host not getting grub2 tftp files created for PXE after being discovered

2017-06-16 Thread Lukas Zapletal
You can use scratchbuild in the meantime:

http://koji.katello.org/koji/taskinfo?taskID=6018

LZ

On Tue, Jun 13, 2017 at 7:18 PM, Robert Anderson <cargofi...@gmail.com> wrote:
> Any timeframe on when the building infrastructure will be fixed and 9.1
> released?  Any info is helpful.  Thank you.
>
>
> Thanks,
> Robert Anderson
>
> On Tue, Jun 13, 2017 at 6:54 AM, Lukas Zapletal <l...@redhat.com> wrote:
>>
>> This (*) will be fixed in Discovery 9.1, we are delayed with the release
>> due to issues with building infrastructure. Stay tuned.
>>
>> (*) It's actually similar bug
>> http://projects.theforeman.org/issues/19313 it's for auto-provisioning
>> only.
>>
>> On Mon, Jun 12, 2017 at 7:50 PM, Robert Anderson <cargofi...@gmail.com>
>> wrote:
>> > discovered host not getting grub2 tftp files created after being
>> > discovered
>> > and auto-rebooted for PXE
>> >
>> > --
>> > 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.
>>
>>
>>
>> --
>> Later,
>>   Lukas @lzap Zapletal
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Foreman users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/foreman-users/aGGcaS1xlvE/unsubscribe.
>> To unsubscribe from this group and all its topics, 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.
>
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Re: fqdn not getting appended to hostname pattern after discovered host transitions to All Hosts

2017-06-13 Thread Lukas Zapletal
We experienced this in 9.0.0 but this seems to be fixed in 9.1
upcoming discovery release, it's delayed hold on.

http://projects.theforeman.org/issues/19445

LZ

On Mon, Jun 12, 2017 at 7:26 PM, Robert Anderson <cargofi...@gmail.com> wrote:
> Where can I find the primary interface inside of the Host Group in the Web
> UI?  I go to:
>
> Hostgroups->Name->Network tab->Domain (my fqdn is there)
>
> I don't see any other association besides that.  I must be missing
> something.  Please explain how I get to the primary interface of the Host
> Group.
>
> The fqdn is still not being tacked on after being found and put into All
> Hosts
>
>
> Thanks,
> Robert Anderson
>
> On Fri, Jun 9, 2017 at 7:02 AM, Lukas Zapletal <l...@redhat.com> wrote:
>>
>> Domain should be included automatically when hostgroup you assign to
>> it has it on primary interface.
>>
>> LZ
>>
>> On Thu, Jun 8, 2017 at 8:12 PM, Robert Anderson <cargofi...@gmail.com>
>> wrote:
>> > by FQDN I mean Domain which is associated to the Host Group which is
>> > being
>> > applied via the Discovery rule
>> >
>> >
>> > On Thursday, June 8, 2017 at 2:09:11 PM UTC-4, Robert Anderson wrote:
>> >>
>> >> My hostname pattern does not include anything to declare the FQDN
>> >> (based
>> >> on the help it would seem unnecessary).  However, when the discovered
>> >> host
>> >> goes from Discovered to All Hosts the FQDN is not included
>> >> automatically.
>> >> What am I missing?
>> >>
>> >> Version 1.14.0
>> >> Discovery plugin 8
>> >
>> > --
>> > 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.
>>
>>
>>
>> --
>> Later,
>>   Lukas @lzap Zapletal
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Foreman users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/foreman-users/FwvnJx_lnG8/unsubscribe.
>> To unsubscribe from this group and all its topics, 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.
>
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] discovered host not getting grub2 tftp files created for PXE after being discovered

2017-06-13 Thread Lukas Zapletal
This (*) will be fixed in Discovery 9.1, we are delayed with the release
due to issues with building infrastructure. Stay tuned.

(*) It's actually similar bug
http://projects.theforeman.org/issues/19313 it's for auto-provisioning
only.

On Mon, Jun 12, 2017 at 7:50 PM, Robert Anderson  wrote:
> discovered host not getting grub2 tftp files created after being discovered
> and auto-rebooted for PXE
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] can no longer provision discovered hosts

2017-06-13 Thread Lukas Zapletal
This will be fixed in Discovery 9.1, we are delayed with the release
due to issues with building infrastructure. Stay tuned.

LZ

On Tue, Jun 13, 2017 at 12:27 AM, Asher Schaffer  wrote:
> Running foreman 1.15.0 on Ubuntu 16.04
>
> Currently discovered hosts are showing up fine, if I attempt to provision
> one I go to the normal provision screen, enter all the info, template
> resolution works correct, but as soon as I hit submit I get  the following
> error: "Host not found Please try to update your request"
>
> I have noticed on the logs the following error on every page but I'm not
> sure if it's related.
> 2017-06-12T15:12:47 20482c08 [app] [I] Started GET
> "/javascripts/locale/en/app.js" for 10.180.112.106 at 2017-06-12 15:12:47
> -0700
> 2017-06-12T15:12:47 20482c08 [app] [F]
>  | ActionController::RoutingError (No route matches [GET]
> "/javascripts/locale/en/app.js"):
>  |   lib/middleware/tagged_logging.rb:18:in `call'
>  |
>  |
>
> Any thoughts on what to look into at this point, I can't find any other
> errors, it has been a while since I tried to provision a discovered host,
> but it was working when I was running 1.14.3
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Domain is not set from a host group

2017-06-12 Thread Lukas Zapletal
Will be fixed in Discovery 9.1, we are having some troubles with our
builder so the update is delayed.

LZ

On Mon, Jun 12, 2017 at 8:16 AM, Ido Kaplan  wrote:
> Hi,
>
> Foreman version 1.14.3, Discovery plugin version 8.0.1.
>
> During provisioning a server with multiple interfaces, domain is not set
> from a host group.
> Error - Failed to save: Domain can't be blank, Interfaces.domain can't find
> domain with this id
> The same issue like this bug - http://projects.theforeman.org/issues/19445
> Can you please advise?
>
> 2017-06-11 13:41:16 f825c503 [app] [I] Started GET
> "/discovered_hosts/mac/edit?utf8=%E2%9C%93%5Bhostgroup_id%5D=1"
> for 1.1.1.1 at 2017-06-11 13:41:16 +
> 2017-06-11 13:41:16 f825c503 [app] [I] Processing by
> DiscoveredHostsController#edit as HTML
> 2017-06-11 13:41:16 f825c503 [app] [I]   Parameters: {"utf8"=>"✓",
> "host"=>{"hostgroup_id"=>"1"}, "id"=>"mac"}
> 2017-06-11 13:41:16 f825c503 [sql] [D]   ActiveRecord::SessionStore::Session
> Load (0.9ms)  SELECT  "sessions".* FROM "sessions" WHERE
> "sessions"."session_id" = $1  ORDER BY "sessions"."id" ASC LIMIT 1
> [["session_id", "f825c5039243217a9989ad65570411fe"]]
> 2017-06-11 13:41:16 f825c503 [sql] [D]   User Load (0.8ms)  SELECT
> "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1  [["id", 3]]
> 2017-06-11 13:41:16 f825c503 [app] [D] Setting current user thread-local
> variable to admin
> 2017-06-11 13:41:16 f825c503 [sql] [D]   AuthSource Load (0.7ms)  SELECT
> "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."id" = $1 LIMIT 1
> [["id", 1]]
> 2017-06-11 13:41:16 f825c503 [sql] [D]   Host::Discovered Load (0.9ms)
> SELECT  "hosts".* FROM "hosts" WHERE "hosts"."type" IN ('Host::Discovered')
> AND "hosts"."id" = $1  ORDER BY hosts.created_at DESC LIMIT 1  [["id", 0]]
> 2017-06-11 13:41:16 f825c503 [sql] [D]   Host::Discovered Load (1.0ms)
> SELECT  "hosts".* FROM "hosts" WHERE "hosts"."type" IN ('Host::Discovered')
> AND "hosts"."name" = $1  ORDER BY hosts.created_at DESC LIMIT 1  [["name",
> "mac"]]
> 2017-06-11 13:41:16 f825c503 [sql] [D]   Nic::Base Load (0.9ms)  SELECT
> "nics".* FROM "nics" WHERE "nics"."host_id" = $1  ORDER BY
> "nics"."identifier" ASC  [["host_id", 12]]
> 2017-06-11 13:41:16 f825c503 [sql] [D](0.2ms)  BEGIN
> 2017-06-11 13:41:16 f825c503 [sql] [D]   Subnet Load (0.7ms)  SELECT
> "subnets".* FROM "subnets" WHERE "subnets"."id" = $1 AND "subnets"."type" =
> $2  ORDER BY vlanid LIMIT 1  [["id", 1], ["type", "Subnet::Ipv4"]]
> 2017-06-11 13:41:16 f825c503 [sql] [D]   Nic::Base Load (0.6ms)  SELECT
> "nics".* FROM "nics" WHERE "nics"."ip" = $1  [["ip", "2.2.2.2"]]
> 2017-06-11 13:41:16 f825c503 [sql] [D]   Nic::Base Load (0.6ms)  SELECT
> "nics".* FROM "nics" WHERE "nics"."domain_id" IS NULL AND "nics"."name" = $1
> [["name", "mac"]]
> 2017-06-11 13:41:16 f825c503 [sql] [D] Using host queue
> 2017-06-11 13:41:16 f825c503 [sql] [D] Using host queue
> 2017-06-11 13:41:16 f825c503 [sql] [D] Using host queue
> 2017-06-11 13:41:16 f825c503 [sql] [D] Using host queue
> 2017-06-11 13:41:16 f825c503 [sql] [D]   Nic::Base Load (0.5ms)  SELECT
> "nics".* FROM "nics" WHERE "nics"."ip" = $1  [["ip", "192.168.0.120"]]
> 2017-06-11 13:41:16 f825c503 [sql] [D] Using host queue
> 2017-06-11 13:41:16 f825c503 [sql] [D] Using host queue
> 2017-06-11 13:41:16 f825c503 [sql] [D] Using host queue
> 2017-06-11 13:41:16 f825c503 [sql] [D](0.4ms)  COMMIT
> 2017-06-11 13:41:16 f825c503 [sql] [D]   Hostgroup Load (0.8ms)  SELECT
> "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."title" = $1  ORDER BY
> hostgroups.title LIMIT 1  [["title", "1"]]
> 2017-06-11 13:41:16 f825c503 [sql] [D]   Hostgroup Load (0.9ms)  SELECT
> "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."id" = $1  ORDER BY
> hostgroups.title LIMIT 1  [["id", 1]]
> 2017-06-11 13:41:16 f825c503 [sql] [D]   Hostgroup Load (1.0ms)  SELECT
> "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."id" = $1  ORDER BY
> hostgroups.title LIMIT 1  [["id", 1]]
> 2017-06-11 13:41:16 f825c503 [sql] [D]   Architecture Load (0.7ms)  SELECT
> "architectures".* FROM "architectures" WHERE "architectures"."id" = $1 LIMIT
> 1  [["id", 1]]
> 2017-06-11 13:41:16 f825c503 [sql] [D]   Operatingsystem Load (0.8ms)
> SELECT  "operatingsystems".* FROM "operatingsystems" WHERE
> "operatingsystems"."id" = $1  ORDER BY "operatingsystems"."title" ASC LIMIT
> 1  [["id", 1]]
> 2017-06-11 13:41:16 f825c503 [sql] [D]   Domain Load (0.7ms)  SELECT
> "domains".* FROM "domains" WHERE "domains"."id" = $1  ORDER BY domains.name
> LIMIT 1  [["id", 1]]
> 2017-06-11 13:41:16 f825c503 [sql] [D]   Subnet Load (0.7ms)  SELECT
> "subnets".* FROM "subnets" WHERE "subnets"."id" = $1  ORDER BY vlanid LIMIT
> 1  [["id", 1]]
> 2017-06-11 13:41:16 f825c503 [app] [I]   Rendered hosts/_progress.html.erb
> (0.2ms)
> 2017-06-11 13:41:16 f825c503 [app] [D] Setting current organization
> thread-local variable to none
> 2017-06-11 

Re: [foreman-users] Re: fqdn not getting appended to hostname pattern after discovered host transitions to All Hosts

2017-06-09 Thread Lukas Zapletal
Domain should be included automatically when hostgroup you assign to
it has it on primary interface.

LZ

On Thu, Jun 8, 2017 at 8:12 PM, Robert Anderson  wrote:
> by FQDN I mean Domain which is associated to the Host Group which is being
> applied via the Discovery rule
>
>
> On Thursday, June 8, 2017 at 2:09:11 PM UTC-4, Robert Anderson wrote:
>>
>> My hostname pattern does not include anything to declare the FQDN (based
>> on the help it would seem unnecessary).  However, when the discovered host
>> goes from Discovered to All Hosts the FQDN is not included automatically.
>> What am I missing?
>>
>> Version 1.14.0
>> Discovery plugin 8
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Re: Cannot delete discovered host

2017-06-08 Thread Lukas Zapletal
Hey, known error in 1.14 series. Fixed in 1.15, discovery 9.1 tomorrow.

LZ

On Wed, Jun 7, 2017 at 10:51 PM, Robert Anderson  wrote:
> Alright.  I got rid of it by trying to provision it and deleting it out of
> All Hosts.
>
>
> On Wednesday, June 7, 2017 at 1:34:50 PM UTC-4, Robert Anderson wrote:
>>
>> I'm running 1.14.0
>>
>> When trying to delete a discovered host I get the error:
>>
>> Cannot delete or update a parent row: a foreign key constraint fails
>> (`foreman`.`host_status`,CONSTRAINT `host_status_hosts_host_id_fk` FOREIGN
>> KEY(`host_id`) REFERENCES `hosts` (`id`))
>>
>> The host does not get removed :(
>>
>> How do I fix this?
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] How to use hostgroup provisioning with Katello 3.4

2017-06-08 Thread Lukas Zapletal
Hello,

Foreman 1.15 or Katello 3.4 hostgroup (combination) provisioning
allows "Satellite 5 - like" provisioning without registering hosts
into system. Although Foreman offers much more flexible and better
ways of provisioning including PXE, PXE-less, bootdisk or discovery,
this is possible. Setting things up for this kind of workflow is not
simple, therefore I recorded this quick and dirty video.

Mouse cursor is unfortunately invisible, but it's pretty clear what is
going on there.

https://www.youtube.com/watch?v=Dc5DN_Xov40=youtu.be

-- 
Later,
  Lukas @lzap Zapletal

-- 
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] host CNAME creation

2017-06-07 Thread Lukas Zapletal
Our API endpoint did not change, just provide CNAME type. It's in /dns
path, search in dns_api.rb.

LZ

On Tue, Jun 6, 2017 at 5:07 PM, justin parker  wrote:
> Based on the issue located here:
> http://projects.theforeman.org/issues/17879
>
> It looks like we can create CNAME's for hosts?  I can't find where to do
> that in the interfaces dialogue.  Am I looking in the wrong location?
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] migrating networks being smartproxy controlled

2017-06-05 Thread Lukas Zapletal
Hey,

so you want to create dynamic lease reservations for them, so they are
then managable by Foreman? You can either manually edit dhcp.leases
file and put them there (see other dhcpd.leases under foremans control
for examples), or you can use DHCP API of the DHCP smart proxy to put
the records in. It's super simple, undocumented tho:

Getting stuff is super easy, posting stuff is little bit more work
(you do HTTP PUT/POST requests):

[lzap@lzapx foreman]$ curl-proxy /dhcp/192.168.122.0
{
"reservations": [
{
"name": "mac5254007338ec.local.lan",
"ip": "192.168.122.116",
"mac": "52:54:00:73:38:ec",
"subnet": "192.168.122.0/255.255.255.0",
"type": "reservation",
"hostname": "mac5254007338ec.local.lan",
"deleteable": true,
"hardware_type": "ethernet",
"filename": "pxelinux.0",
"nextServer": "192.168.122.1"
},
{
"name": "mac525400549b27.local.lan",
"ip": "192.168.122.136",
"mac": "52:54:00:54:9b:27",
"subnet": "192.168.122.0/255.255.255.0",
"type": "reservation",
"hostname": "mac525400549b27.local.lan",
"deleteable": true,
"hardware_type": "ethernet",
"filename": "pxelinux.0",
"nextServer": "192.168.122.1"
},
{
"name": "jimmy-lavatch.local.lan",
"ip": "192.168.122.110",
"mac": "52:54:00:f0:67:7c",
"subnet": "192.168.122.0/255.255.255.0",
"type": "reservation",
"hostname": "jimmy-lavatch.local.lan",
"deleteable": true,
"hardware_type": "ethernet",
"filename": "pxelinux.0",
"nextServer": "192.168.122.1"
},
{
"name": "dummy-host-1.local.lan",
"ip": "192.168.122.112",
"mac": "aa:bb:cc:dd:ee:ff",
"subnet": "192.168.122.0/255.255.255.0",
"type": "reservation",
"hostname": "dummy-host-1.local.lan",
"deleteable": true,
"hardware_type": "ethernet",
"filename": "pxelinux.0",
"nextServer": "192.168.122.1"
},
{
"name": "mac52540052f68a.local.lan",
"ip": "192.168.122.56",
"mac": "52:54:00:52:f6:8a",
"subnet": "192.168.122.0/255.255.255.0",
"type": "reservation",
"hostname": "mac52540052f68a.local.lan",
"deleteable": true,
"hardware_type": "ethernet",
"filename": "pxelinux.0",
"nextServer": "192.168.122.1"
}
],
"leases": [

]
}
[lzap@lzapx foreman]$ curl-proxy /dhcp/192.168.122.0/ip/192.168.122.56
[
{
"name": "mac52540052f68a.local.lan",
"ip": "192.168.122.56",
"mac": "52:54:00:52:f6:8a",
"subnet": "192.168.122.0/255.255.255.0",
"type": "reservation",
"hostname": "mac52540052f68a.local.lan",
"deleteable": true,
"hardware_type": "ethernet",
"filename": "pxelinux.0",
"nextServer": "192.168.122.1"
}
]

On Mon, Jun 5, 2017 at 1:52 PM, justin parker  wrote:
> Hello,
>
> We have five networks that aren't being controlled by a foreman smart proxy,
> but would like them to be.  There are already hosts on the network that are
> DHCP clients.  I have already gotten a list and would like to add these
> hosts into foreman's DHCP before I switch over to controlling the networks
> with the smart proxy so their IP addresses don't change.  Is there a way to
> do this via the API or hammer?
>
> Thanks,
> Justin
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Re: Discovery Rules

2017-06-05 Thread Lukas Zapletal
Will fix this thanks.

On Mon, Jun 5, 2017 at 7:35 AM, Ido Kaplan  wrote:
> Thank you - it's working!
> I suggest to edit the examples (4.3.2 Hostname patterns) in
> https://theforeman.org/plugins/foreman_discovery/8.0/index.html
>
>
> On Sunday, June 4, 2017 at 8:45:17 PM UTC+3, Ido Kaplan wrote:
>>
>> Hi,
>>
>> Foreman 1.14.3
>> Foreman Discovery 8.01
>>
>> When I try to create a discovery rule with this hostname patttern -
>> load-balancer-<%= @host.facts['bios_vendor'] + '-' + rand(9) %>
>> I get an error.
>>
>> 2017-06-04 20:22:34 bdcaf224 [app] [I] Started POST
>> "/discovered_hosts/mac/auto_provision" for 10.20.10.4 at
>> 2017-06-04 20:22:34 +0300
>> 2017-06-04 20:22:34 bdcaf224 [app] [I] Processing by
>> DiscoveredHostsController#auto_provision as HTML
>> 2017-06-04 20:22:34 bdcaf224 [app] [I]   Parameters:
>> {"authenticity_token"=>"X=", "id"=>"mac"}
>> 2017-06-04 20:22:34 bdcaf224 [app] [I] Match found for host
>> mac (45) rule Test (1)
>> 2017-06-04 20:22:34 bdcaf224 [templates] [I] Rendering template 'Unnamed'
>> 2017-06-04 20:22:34 bdcaf224 [app] [W] Action failed
>>  | TypeError: no implicit conversion of Fixnum into String
>>  |
>> /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.4/lib/safemode/jail.rb:25:in
>> `+'
>>  |
>> /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.4/lib/safemode/jail.rb:25:in
>> `method_missing'
>>  |
>> /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.4/lib/safemode.rb:53:in
>> `bind'
>>  |
>> /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.4/lib/safemode.rb:51:in
>> `eval'
>>  |
>> /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.4/lib/safemode.rb:51:in
>> `eval'
>>  | /usr/share/foreman/lib/foreman/renderer.rb:32:in `render_safe'
>>  | /usr/share/foreman/lib/foreman/renderer.rb:161:in `unattended_render'
>>  | /usr/share/foreman/app/models/host/managed.rb:814:in `render_template'
>>  |
>> /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-8.0.1/app/controllers/concerns/foreman/controller/discovered_extensions.rb:54:in
>> `perform_auto_provision'
>>  |
>> /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-8.0.1/app/controllers/discovered_hosts_controller.rb:161:in
>> `auto_provision'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/implicit_render.rb:4:in
>> `send_action'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/abstract_controller/base.rb:198:in
>> `process_action'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/rendering.rb:10:in
>> `process_action'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/abstract_controller/callbacks.rb:20:in
>> `block in process_action'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in
>> `call'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in
>> `call'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:555:in
>> `block (2 levels) in compile'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in
>> `call'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in
>> `call'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:498:in
>> `block (2 levels) in around'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:298:in
>> `call'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:298:in
>> `block in halting_and_conditional'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in
>> `call'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in
>> `block in around'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in
>> `call'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in
>> `call'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:498:in
>> `block (2 levels) in around'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in
>> `call'
>>  |
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in
>> `block (2 levels) in halting'
>>  |
>> /opt/theforeman/tfm/root/usr/share/gems/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in
>> 

Re: [foreman-users] pxelinux.cfg file not created when using discovery plugin API

2017-06-04 Thread Lukas Zapletal
Oh if this is the one, then this will be fixed in the upcoming
Discovery 9.1. We are almost there, expect it this week!

LZ

On Fri, Jun 2, 2017 at 10:22 PM,  <ejste...@gmail.com> wrote:
> I had a similar issue. Removal of line 8  host.clear_association_cache in
> app/services/foreman_discovery/host_converter.rb appears to have fixed it!
> Thank you
>
> On Wednesday, May 17, 2017 at 2:52:08 AM UTC-6, Lukas Zapletal wrote:
>>
>> Hello, might be also http://projects.theforeman.org/issues/19313
>>
>> Try to comment out this line:
>>
>>
>> https://github.com/theforeman/foreman_discovery/pull/346/files#diff-d165f1f7d8058930cfef75cad203b33eR8
>>
>> LZ
>>
>> On Tue, May 16, 2017 at 5:17 AM, Sean Larimore <slari...@gmail.com> wrote:
>> > I'm running into an issue where the pxelinux.cfg file is not created
>> > when
>> > using discovery plugin API to provision discovered hosts. Foreman
>> > returns a
>> > 200 response and the node shows up in the inventory but after rebooting
>> > it
>> > does not boot into the installer because of the missing pxelinux.cfg
>> > file.
>> > I'm running foreman_discovery-8.0.1 with Foreman 1.14.3. My log output
>> > is
>> > below. Any ideas on how to resolve the issue?
>> >
>> >
>> >
>> >
>> >
>> > /var/log/foreman/production.log
>> >
>> > 2017-05-15T20:42:47 d83643db [app] [I] Processing by
>> > Api::V2::DiscoveredHostsController#update as JSON
>> > 2017-05-15T20:42:47 d83643db [app] [I]   Parameters:
>> > {"discovered_host"=>{"ip"=>"44.128.25.4", "mac"=>"00:6b:f1:61:c2:d2",
>> > "name"=>"baremetal.example.com", "hostgroup_id"=>"18"}, "apiv"=>"v2",
>> > "id"=>"277"}
>> > 2017-05-15T20:42:47 d83643db [app] [I] Authorized user admin(Admin User)
>> > 2017-05-15T20:42:48 d83643db [app] [I]   Rendered
>> >
>> > vendor/ruby/2.3.0/gems/foreman_discovery-8.0.1/app/views/api/v2/discovered_hosts/update.json.rabl
>> > (1.0ms)
>> > 2017-05-15T20:42:48 d83643db [app] [I] Completed 200 OK in 1323ms
>> > (Views:
>> > 1.8ms | ActiveRecord: 50.9ms)
>> >
>> >
>> > /var/log/foreman-proxy/proxy.log
>> >
>> > I, [2017-05-15T20:42:48.339478 ]  INFO -- : 44.128.12.21 - -
>> > [15/May/2017:20:42:48 -0600] "PUT /discovery/44.128.25.4/power/reboot
>> > HTTP/1.1" 200 15 0.0948
>> > I, [2017-05-15T20:42:49.239788 ]  INFO -- : 44.128.12.21 - -
>> > [15/May/2017:20:42:49 -0600] "GET /tftp/serverName HTTP/1.1" 200 17
>> > 0.0005
>> > I, [2017-05-15T20:42:49.574627 ]  INFO -- : 44.128.12.21 - -
>> > [15/May/2017:20:42:49 -0600] "GET /tftp/serverName HTTP/1.1" 200 17
>> > 0.0005
>> > E, [2017-05-15T20:42:50.304281 ] ERROR -- : Failed to authenticate node
>> > .
>> > Missing some headers
>> >
>> > I'm using Ansible for the API call. Playbook below.
>> >
>> > ---
>> >
>> > - hosts: localhost
>> >   tasks:
>> >
>> >   - name: Provision Bare Metal Server
>> > uri:
>> >   url: https://foreman/api/v2/discovered_hosts/278
>> >   user: "user"
>> >   password: "pass"
>> >   body_format: json
>> >   method: PUT
>> >   status_code: 200
>> >   validate_certs: no
>> >   force_basic_auth: yes
>> >   headers:
>> > Content-Type: "application/json"
>> >   body:
>> > discovered_host:
>> >   name: "baremetal.example.com"
>> >   hostgroup_id: "18"
>> >   build: "1"
>> >   mac: "00:6b:f1:61:c2:d2"
>> >   ip: "44.128.25.4"
>> >
>> >
>> > Thanks!
>> >
>> > Sean
>> >
>> > --
>> > 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-user...@googlegroups.com.
>> > To post to this group, send email to forema...@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/foreman-users.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Later,
>>   Lukas @lzap Zapletal



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Fresh Foreman 1.15.0 install dhcp subnet issue...

2017-06-01 Thread Lukas Zapletal
It works here, here is my command:

SATNET=122
  --foreman-proxy-dhcp true \
  --foreman-proxy-dhcp-interface virbr1 \
  --foreman-proxy-dhcp-gateway=192.168.${SATNET}.1 \
  --foreman-proxy-dhcp-range="192.168.${SATNET}.10 192.168.${SATNET}.109" \
  --foreman-proxy-dhcp-nameservers="192.168.${SATNET}.1" \

Make sure you provide foreman-proxy-dhcp-interface and it has correct
IP and mask.



On Wed, May 31, 2017 at 4:09 PM, Sean  wrote:
> Sorry, I should have mentioned that the Virtualbox Nat Network's gateway is
> 192.168.2.1 and it has dhcp disabled.  Also, the foreman server's IP address
> is 192.168.2.10.
>
>
> --Sean
>
> On Wed, May 31, 2017 at 10:02 AM, Sean A  wrote:
>>
>> Hi, I've setup a prototype environment using Virtualbox with Nat Network.
>> The Foreman VM is CentOS 7.3, I've installed foreman 1.15.0 with puppet
>> 4.10, so I can play with Hiera 5.
>>
>> Anyway, my installer command line is this:
>>
>> foreman-installer --foreman-proxy-dhcp=true
>> --foreman-proxy-dhcp-gateway='192.168.2.1' --foreman-proxy-dhcp-managed=true
>> \
>> --foreman-proxy-dhcp-nameservers='192.168.2.10'
>> --foreman-proxy-dhcp-option-domain='demo.local' \
>> --foreman-proxy-dhcp-pxeserver='192.168.2.10'
>> --foreman-proxy-dhcp-range='192.168.2.20 192.168.2.50' \
>> --foreman-proxy-dhcp-search-domains='demo.local'
>> --foreman-proxy-dhcp-server='192.168.2.10' --foreman-proxy-dns=true \
>> --foreman-proxy-dns-forwarders=8.8.8.8
>> --foreman-proxy-dns-forwarders=8.8.4.4 --foreman-proxy-dns-managed=true \
>> --foreman-proxy-dns-reverse='2.168.192.in-addr.arpa'
>> --foreman-proxy-dns-server='192.168.2.10' \
>> --foreman-proxy-dns-ttl='360' --foreman-proxy-dns-zone='demo.local'
>> --foreman-unattended=true --foreman-use-vhost=true \
>> --foreman-proxy-dhcp-provider='isc'--foreman-proxy-dns-provider='nsupdate'
>> --foreman-proxy-puppet=true \
>> --foreman-proxy-tftp=true --foreman-proxy-tftp-managed=true
>> --puppet-agent=true --puppet-autosign-entries='*.demo.local' \
>> --puppet-server=true --puppet-server-ca=true --enable-foreman
>> --enable-foreman-proxy --enable-puppet
>>
>> The installer throws an error when trying to start the dhcpd service...
>>
>> May 31 09:47:25 foreman.demo.local dhcpd[5726]: bad range, address
>> 192.168.2.20 not in subnet 192.168.2.10 netmask 255.255.255.255
>> May 31 09:47:25 foreman.demo.local systemd[1]: dhcpd.service: main process
>> exited, code=exited, status=1/FAILURE
>>
>> Basically, the installer isn't defining the dhcp subnet correctly and
>> here's what the subnet in dhcpd.conf looks like:
>>
>> # demo.local
>> subnet 192.168.2.10 netmask 255.255.255.255 {
>>   pool
>>   {
>> range 192.168.2.20 192.168.2.50;
>>   }
>>
>>
>>   option subnet-mask 255.255.255.255;
>>   option routers 192.168.2.1;
>>   option domain-search "demo.local";
>> }
>>
>> Any idea why the installer is defining the subnet as a single ip address?
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Foreman users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/foreman-users/2G1mQWMo1u0/unsubscribe.
>> To unsubscribe from this group and all its topics, 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.
>
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] VM provisioning fails with errors

2017-06-01 Thread Lukas Zapletal
The DNS server on Foreman does not have foreman A record, add it manually
if this is what you want.

I'd love to have this in our installer, but we don't have it. With katello
plugin installed, you cannot workaround this with unattended_url anymore.

LZ

On Wed, May 31, 2017 at 8:57 PM, bijith nair  wrote:

> Hello Team,
>
> While trying to provisioning VM on VMware vcenter, The console show below
> error:-
>
>
> 
>
>
>
>
>
>
>
>
>
>
>
> To fix this up i have to manually change the hostname to ipaddr to make it
> working, Is there a way i can resolve the hostname?
>
> Note:
> #DNS Server is configured on foreman, Esxi and Media (ISO mounted) server
> and can resolve both hostname and ipaddr
> #/etc/hosts is updated
>
> Thanks in Advance..
>
> Rgds/Bijith
>
>
> --
> 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.
>



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Heads-up: Foreman 1.15 and Discovery

2017-05-24 Thread Lukas Zapletal
Hello,

although I released Discovery 9.0 plugin for Foreman 1.15
compatibility, we are suffering from several blocker bugs around
Provision Host (Edit Host) form, auto-provisionig, DHCP orchestration
in Foreman and DHCP smart-proxy module. We are planning 9.1 release in
the upcoming week or two. If discovery is important to you, do not
upgrade to Foreman 1.15 until then. Sorry for inconvenience.

While we will be improving integration tests around Edit Host form and
auto-provisioning, some bugs can be only revealed via end-to-end
testing which we do not perform automatically. I would like to
encourage you to test our Foreman RC releases with all plugins you
care about and report issues sooner, that's why we are doing these
releases anyway.

Important issues found:

http://projects.theforeman.org/versions/188
http://projects.theforeman.org/issues/19649
http://projects.theforeman.org/issues/19634


-- 
Later,
  Lukas @lzap Zapletal

-- 
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] provisioning a system with two NIC

2017-05-24 Thread Lukas Zapletal
So the output artifact is rhcfg network configuration file, that's
clear. You probably struggle with our ERB templating engine, it's
actually ERB (google that) bug in SafeMode which means only selected
variables and functions are available. In Foreman 1.14+ there is a
Help tab in the Template editor which shows you the list.

LZ

On Tue, May 23, 2017 at 8:52 PM, Edward Clay <edward.c...@uk2group.com> wrote:
> Lukas, Thanks for this information.  I gues what I need to do is figure
> out how to create my own snippet since most of this info isn't clear to
> me.  Where would be the best place to start learning how to do this?
>
> On Tue, 2017-05-23 at 09:05 +0200, Lukas Zapletal wrote:
>> Hello,
>>
>> in this case you want to leave default kickstart template "network"
>> configuration as is and only change post configuration for network:
>>
>> https://github.com/theforeman/community-templates/blob/develop/provis
>> ioning_templates/snippet/kickstart_networking_setup.erb
>>
>> This is a snippet that is inserted into default kickstart:
>>
>> <%= snippet 'kickstart_networking_setup' %>
>>
>> You perhaps want to create new snippet and configure your cards to
>> your needs. That's the easiest method.
>>
>> You an also provide some flag (host parameter) that will override the
>> default behavior and configure NIC as static, then you can add this
>> parameter to hostgroup or something. You can do pretty much anything
>> you want.
>>
>> But if you want to start with PXE and then "switch" to static at some
>> point, Foreman itself does not support that. You can use Bootdisk
>> instead of PXE which will work with static IP allocations tho.
>>
>> LZ
>>
>> On Tue, May 23, 2017 at 12:29 AM, Edward Clay <Edward.Clay@uk2group.c
>> om> wrote:
>> > Hello,  I am trying to figure out how to best configure my
>> > katello/foreman
>> > provisioning kickstart template to configure a system with 2
>> > NIC's.  One nic
>> > is configured for private communication via a non routable ip
>> > range.  We can
>> > assign these IPs via dhcpd which we then use for doing the
>> > provisioning
>> > process via a local OS repo hosted on the katello/foreman
>> > server.  The
>> > second NIC is publicly accessible and is assigned statically.  What
>> > I'm not
>> > sure how to do is pxe booting via the private interface (currently
>> > done by
>> > assigning via dhcpd) and configuring both NIC via static assignment
>> > after
>> > the provisioning process is complete.  It seems like I had this
>> > working but
>> > it's been a long time since I tinkered with this so my memory could
>> > be
>> > wrong.  I believe this line was working in the past.
>> >
>> > network --bootproto <%= dhcp ? 'dhcp --nodefroute' : "static
>> > --ip=#{@host.ip} --netmask=#{subnet.mask} --
>> > gateway=#{subnet.gateway}
>> > --nameserver=#{[subnet.dns_primary,
>> > subnet.dns_secondary].select(&:present?).join(',')}" %> --hostname
>> > <%= @host
>> > %><%= os_major >= 6 ? " --device=#{@host.mac}" : '' -%>
>> >
>> > I've configured the private NIC as Managed and Provision while the
>> > Public
>> > NIC is configured as Primary.
>> >
>> > Are there any working solutions out there for this scenario?
>> >
>> > --
>> > 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.
>>
>>
>>
>> --
>> Later,
>>   Lukas @lzap Zapletal
>>
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] provisioning a system with two NIC

2017-05-23 Thread Lukas Zapletal
Hello,

in this case you want to leave default kickstart template "network"
configuration as is and only change post configuration for network:

https://github.com/theforeman/community-templates/blob/develop/provisioning_templates/snippet/kickstart_networking_setup.erb

This is a snippet that is inserted into default kickstart:

<%= snippet 'kickstart_networking_setup' %>

You perhaps want to create new snippet and configure your cards to
your needs. That's the easiest method.

You an also provide some flag (host parameter) that will override the
default behavior and configure NIC as static, then you can add this
parameter to hostgroup or something. You can do pretty much anything
you want.

But if you want to start with PXE and then "switch" to static at some
point, Foreman itself does not support that. You can use Bootdisk
instead of PXE which will work with static IP allocations tho.

LZ

On Tue, May 23, 2017 at 12:29 AM, Edward Clay  wrote:
> Hello,  I am trying to figure out how to best configure my katello/foreman
> provisioning kickstart template to configure a system with 2 NIC's.  One nic
> is configured for private communication via a non routable ip range.  We can
> assign these IPs via dhcpd which we then use for doing the provisioning
> process via a local OS repo hosted on the katello/foreman server.  The
> second NIC is publicly accessible and is assigned statically.  What I'm not
> sure how to do is pxe booting via the private interface (currently done by
> assigning via dhcpd) and configuring both NIC via static assignment after
> the provisioning process is complete.  It seems like I had this working but
> it's been a long time since I tinkered with this so my memory could be
> wrong.  I believe this line was working in the past.
>
> network --bootproto <%= dhcp ? 'dhcp --nodefroute' : "static
> --ip=#{@host.ip} --netmask=#{subnet.mask} --gateway=#{subnet.gateway}
> --nameserver=#{[subnet.dns_primary,
> subnet.dns_secondary].select(&:present?).join(',')}" %> --hostname <%= @host
> %><%= os_major >= 6 ? " --device=#{@host.mac}" : '' -%>
>
> I've configured the private NIC as Managed and Provision while the Public
> NIC is configured as Primary.
>
> Are there any working solutions out there for this scenario?
>
> --
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Re: Occasional ERF50-7522 on facts_refresh

2017-05-22 Thread Lukas Zapletal
You forgot the question mark, did you? Or maybe I did in the previous
mail, anyway its really this:

respond_to?(:reports)

https://ruby-doc.org/core-2.4.1/Object.html#method-i-respond_to-3F

LZ

On Fri, May 19, 2017 at 8:47 PM, Konstantin Orekhov  wrote:
>
>> unless new_host && hostgroup.nil? && respond_to?(:reports) &&
>> reports.empty?
>>
>
> Well, that's what I was trying to tell you - this patch did not work for me.
> I tried it out as you suggested on May 3rd, the only difference it made is
> the error message changed from
>
> Discovered by URL: https://foreman.domain.com
> Registering host with Foreman (https://foreman.domain.com)
> Response from Foreman 422: {"message":"undefined local variable or method
> `reports' for #\u003cHost::Discovered:0x007f0a485be538\}
>
> to
>
> Discovered by URL: https://spc.vip
> Registering host with Foreman (https://spc.vip)
> Response from Foreman 422: {"message":"undefined method `respond_to' for
> #\u003cHost::Discovered:0x007f102410e8a8\u003e"}
>
> So, only a complete removal of that RPM helped me so far.
>



-- 
Later,
  Lukas @lzap Zapletal

-- 
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] Re: Occasional ERF50-7522 on facts_refresh

2017-05-19 Thread Lukas Zapletal
On Fri, May 19, 2017 at 10:54 AM, Lukas Zapletal <l...@redhat.com> wrote:
> unless new_host && hostgroup.nil? && reports.nil? && reports.empty?


Sorry I mean:

unless new_host && hostgroup.nil? && respond_to?(:reports) && reports.empty?

Send a PR to discuss this with Greg for a proper fix, this is dirty.

-- 
Later,
  Lukas @lzap Zapletal

-- 
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.


  1   2   3   >