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

2017-10-27 Thread Trisha Hoang
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.


Re: [foreman-users] AD/LDAP group authentication?

2017-10-27 Thread Andrew Schofield
The answer is more 'sort of'. So Marek is entirely correct however users 
which are created in this way are NOT assigned to any locations nor 
organizations so there is manual (or scripted) post work required to be 
done.

I raised [1] in 2015, it's private but the comments are:

Currently, when you create a user you have to assign that user to a location in 
order for that user to be able to view / manage entities within that location. 
However this is not ideal for two key reasons:

1) Users which belong to the same group and role still require manual tasks to 
be performed to ensure they can behave is a consistent manner.

2) Users created via LDAP / AD where the 'Automatically create accounts in 
Foreman' option is checked are not added to ANY location. This means that 
manual steps have to be take to add the users to locations and organizations.

This RFE therefore is to allow location / organization details to be assigned 
per user group as the user groups section maps users to AD (or internal) groups 
and maps the groups to roles. This should be enhanced to add Organizations and 
Locations such that users created who belong to this group will be assigned 
locations and organizations commensurate to these groups.


[1] https://bugzilla.redhat.com/show_bug.cgi?id=1293835



On Friday, October 27, 2017 at 4:17:07 PM UTC-4, Marek Hulán wrote:
>
> On pátek 6. října 2017 22:27:46 CEST Charlie Baum wrote: 
> > Pretty new to Foreman and standing up our first POC of the product. 
> > 
> > Can someone verify/shoot down a question I have?  Does Foreman not 
> support 
> > AD group authentication?  In other words, can you authenticate to the 
> > Foreman UI without being setup as a local Foreman user first?  I am 
> playing 
> > around with AD stuff in there and got my AD account setup for access 
> just 
> > fine.  I created a user group linked to an external AD account but 
> unless I 
> > setup the user locally in Foreman, a member of that AD group could not 
> > login to Foreman.  Is this by design or am I overlooking something? 
>  Thanks 
> > folks! 
> > 
> > CB 
>
> Hello, yes, this is entirely possible. Just setup LDAP auth source. Double 
> check you have "Automatically create accounts in Foreman" checkbox enabled 
> for 
> this auth source (it's under Account tab) 
>
> Hope this helps 
>
> -- 
> Marek 
>

-- 
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] AD/LDAP group authentication?

2017-10-27 Thread Marek Hulán
On pátek 6. října 2017 22:27:46 CEST Charlie Baum wrote:
> Pretty new to Foreman and standing up our first POC of the product.
> 
> Can someone verify/shoot down a question I have?  Does Foreman not support
> AD group authentication?  In other words, can you authenticate to the
> Foreman UI without being setup as a local Foreman user first?  I am playing
> around with AD stuff in there and got my AD account setup for access just
> fine.  I created a user group linked to an external AD account but unless I
> setup the user locally in Foreman, a member of that AD group could not
> login to Foreman.  Is this by design or am I overlooking something?  Thanks
> folks!
> 
> CB

Hello, yes, this is entirely possible. Just setup LDAP auth source. Double 
check you have "Automatically create accounts in Foreman" checkbox enabled for 
this auth source (it's under Account tab)

Hope this helps

--
Marek

-- 
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-27 Thread Oleg Mcnoleg
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.


Re: [foreman-users] How to display IPMI consoles in the Foreman?

2017-10-27 Thread Alvin Starr
With the start of this discussion I started poking around at a couple of 
ideas and the novnc referenced.


I have access to a number of Supermicro and HP systems and decided to 
try the novnc solution.


My in house several year old Supermicro is built using a different 
chipset than the one referenced in the novnc by kellyk It looks like 
there is some sort of authentication incompatibility.


On the much newer Supermicro systems I have access to the VNC ports 
appear to be blocked by some sort of internal firewall.


HP uses port 17990 and at first look does not appear to be VNC but it 
may just be VNC with some wrapping around it.


I have no Dell equipment to test against.

Although I would love to be able to pull up a iKVM console via Foreman 
my feeling is that the novnc fork needs some testing first.



On 10/27/2017 06:47 AM, 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 :)



--
Alvin Starr   ||   land:  (905)513-7688
Netvel Inc.   ||   Cell:  (416)806-0133
al...@netvel.net  ||

--
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: "No templates were configured" for image builds?

2017-10-27 Thread Greg Sutcliffe
On Tue, 2017-09-12 at 08:11 +0200, Ivan Necas wrote:
> In order to be able to assign the template to the OS, you need first
> go to the template's associations tab, and add the OS there.
> Then it should make it possible to set that in the OS.
> 
> I'm not sure why the default user_data template is not cloud-init,
> but I deffer the question to someone else.

Ivan, for your education :P - user-data comes in two flavours, that's
all there is to it :D

The first is cloud-init style specfications which are acted on by a
variety of providers on the image. The second is a shell script
executed as root by the cloud-init process as it boots. You can find
out more here:

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html#user-
data-shell-scripts

Mike - so, I'm glad your EC2 instances are working, since that's what
I'd hope. However, as Ivan noted, the VMware customization spec is
*very* limited, and many people on here have had issues getting it to
work. THis is sadly a limitation VMware chooses to place on itself, and
there's not much we can do about it (except get VMware customers to
pressure them to change it :P).

Here's a link from a while ago from someone who says they got it
working: https://groups.google.com/d/msg/foreman-users/d6Yc9uiK9oo/RZ9I
MPo9AwAJ. In general, search the list for "vmware customization" should
get you a few otehr hits too.

Hope it helps!
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.


Re: [foreman-users] AWS EC2 with Foreman

2017-10-27 Thread Greg Sutcliffe
On Wed, 2017-10-25 at 15:39 -0700, steved0ca wrote:
> I was seeing this on 1.15.4 and upgraded to 1.15.6 with the same
> results.
> 
> For some reason image based deployments that have userdata enabled
> also require a finish template associated.

That's a bug if it's reproducible, as Foreman cannot use both for a VM
creation anyway - they're mutually exclusive. If the user-data flag is
set on the Image then it can only use that template.

> This leads to 1 of 2 outcomes:
> 
> 1. as Ivan stated, the host creation UI throws this error and a
> cannot proceed

> 2. as a workaround, a finish template is associated, but if VM is
> being deployed with a non-root user (ie 'centos' for Centos
> instances) the provisioning cannot be completed via SSH as the wrong
> user is trying to login to run the finish script. This happens even
> if the image is configured with user 'centos':

There's two things here. That it is attempting to use the finish
template suggests the user-data flag is not set on the Image, or not
working. The choice of user & password for an SSH-based image, though,
is configurable in the Image (in the edit page).

Note when I say Image, I'm talking about the object in the Foreman UI
that is linked to the AMI, not the AMI itself.

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.


Re: [foreman-users] How to display IPMI consoles in the Foreman?

2017-10-27 Thread Konstantin Lepikhov
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.


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

2017-10-27 Thread Greg Sutcliffe
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.


Re: [foreman-users] How to display IPMI consoles in the Foreman?

2017-10-27 Thread Greg Sutcliffe
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

-- 
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 subramaniyan.R
Hi Lukas,
  while trying to connect the console im getting the error. i have
modified two files for console listed below and i have tried in firefox and
chrome also but doesn't work for me.

vim /etc/httpd/conf.d/05-foreman-ssl.conf

  ## SSL directives
  SSLEngine on
  SSLCertificateFile  "/etc/puppetlabs/puppet/ssl/certs/newcert.pem"
  SSLCertificateKeyFile
 "/etc/puppetlabs/puppet/ssl/private_keys/localkey.pem"
  SSLCertificateChainFile "/etc/puppetlabs/puppet/ssl/certs/chain.pem"
  SSLVerifyClient optional
  SSLCACertificateFile"/etc/puppetlabs/puppet/ssl/certs/ca.pem"
  SSLCARevocationFile "/etc/puppetlabs/puppet/ssl/crl.pem"
  SSLVerifyDepth  3


 vi /etc/foreman/settings.yaml

# Websockets
:websockets_encrypt: true
:websockets_ssl_key: /etc/puppetlabs/puppet/ssl/private_keys/localkey.pem
:websockets_ssl_cert: /etc/puppetlabs/puppet/ssl/certs/newcert.pem

# SSL-settings












 Regards,

Subramaniyan.R

On Fri, Oct 27, 2017 at 1:56 PM, Lukas Zapletal  wrote:

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

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  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"  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  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 
>>> 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 a topic in the
> Google Groups "Foreman users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/foreman-users/JSxObqrbXKE/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 

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