Re: [foreman-users] Re: IPXE instead of PXE for the initial menu and for discovery?

2016-08-04 Thread 'Konstantin Orekhov' via Foreman users
> I believe your patch is correct, what's I believe is wrong is the way > you load data via shell. Should I submit a PR myself or create a new feature request for someone in your team then? > Doesn't the first newline break it? Try to use > stdin to provide the content. > Yes, it

Re: [foreman-users] Re: IPXE instead of PXE for the initial menu and for discovery?

2016-08-04 Thread 'Konstantin Orekhov' via Foreman users
> I don't understand how would you download the script from proxy, using > HTTP? There is no preconfigured httpd service by default. > > > - support of more protocols to download config file - HTTP/HTTPS, etc. > > But no TFTP, right? I am not following why someone would do this. > No, TFTP

[foreman-users] Occasional ERF50-7522 on facts_refresh

2017-02-16 Thread 'Konstantin Orekhov' via Foreman users
Hello all! On my 1.14.1 Foreman I occasionally see facts_refresh for a newly registered node failing with this error: - *Error: *ERF50-7522 [Foreman::WrappedException]: Failed to refresh facts for mac90e2bac5b1a0 with error Could not get facts from proxy https://10.158.31.188:8443:

[foreman-users] Re: Occasional ERF50-7522 on facts_refresh

2017-02-27 Thread 'Konstantin Orekhov' via Foreman users
Nobody else sees this issue? Lukas #lzap Zapletal, do you have any thoughts on this? I do have a bunch issues with discovered hosts at the moment and I think it is related - I have many duplicate hosts discovered - the same MAC name, but no other data/facts, anything:

[foreman-users] Re: Occasional ERF50-7522 on facts_refresh

2017-02-27 Thread 'Konstantin Orekhov' via Foreman users
One more thing to note - if I delete a discovered host from Foreman and re-run older discovery agent, it gets the following errors from Foreman for about 5 minutes, but after that successfully registers, closely resembling behavior observed on FDI 3.3.1: Fact cache invalid, reloading to

Re: [foreman-users] Double-reporting to 2 different instances of Foreman

2016-09-29 Thread 'Konstantin Orekhov' via Foreman users
Thanks, Dominic! It turned out to be SETTINGS that needed to be renamed, renaming $settings_file had no effect. -- 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

Re: [foreman-users] Directory environments and the common environment?

2016-10-04 Thread 'Konstantin Orekhov' via Foreman users
Hello, Sean and Dominic! I have a slightly different angle to this problem. Just like above, I have a "common" environment, which is default one for all of the hosts that are NOT in any other env, and some directory-based ones. However, what I'd like to do with common modules is to share

Re: [foreman-users] Troubles with calling /api/v2/discovered_hosts/:id/refresh_facts

2016-09-16 Thread 'Konstantin Orekhov' via Foreman users
> > > > $ curl -kSs -H "Content-Type: application/json" -H > > "Accept:application/json" -u admin:$PASSWORD > > https://localhost/api/v2/discovered_hosts/mac008cfaed69c8/refresh_facts > | > > jq '.' > > { > > "status": "404", > > "error": "Not Found" > > } > > This API call is not

[foreman-users] Sharing common puppet modules between multiple environments in Foreman

2016-10-10 Thread 'Konstantin Orekhov' via Foreman users
Hello all! I have a "common" environment with some non-app-related modules (OS repos, DNS, NTP, things of that nature), and several other environments, which are application-specific - for example, "production". Most of the common modules need to applied to all systems in "production"

[foreman-users] Re: Performance Problems on Webinterface /puppetclasses

2016-10-27 Thread 'Konstantin Orekhov' via Foreman users
Probably need to start from Apache/Passenger tuning as I started to get these on puppet runs: Could not retrieve catalog from remote server: Error 503 on SERVER: This website is under heavy loadWe're sorry, too many people are accessing this website at the same time. We're working on this

[foreman-users] Re: Performance Problems on Webinterface /puppetclasses

2016-10-27 Thread 'Konstantin Orekhov' via Foreman users
On the same note - after upgrading to 1.13.1 today, I immediately noticed the huge delays in search through the hosts in both WebUI and API (the latter is actually worse than WebUI). Here are few examples: # time curl -kSs -u admin:$PASS https://localhost/api/hosts | jq '.' | grep total

[foreman-users] Re: WebUI and API search performance issues in 1.13.1

2016-10-29 Thread 'Konstantin Orekhov' via Foreman users
Corresponding logs (WebUI search): 2016-10-28 18:39:29 a607439e [app] [I] Parameters: {"utf8"=>"✓", "search"=>"test"} 2016-10-28 18:40:16 a607439e [app] [I] Rendered hosts/_list.html.erb (10.1ms) 2016-10-28 18:40:16 a607439e [app] [I] Rendered hosts/index.html.erb within

[foreman-users] ActiveRecord::UnknownAttributeError: unknown attribute 'provision_method' for Host::Managed

2016-10-19 Thread 'Konstantin Orekhov' via Foreman users
Hello there! I'm having an isolated issue on one of the Foreman (separate) instances, where I can't deploy Libvirt VMs into compute resources anymore. A standard procedure (through UI): New Host put a hostname for a new VM pick a compute resource to deploy on At this point I see that

Re: [foreman-users] Re: WebUI and API search performance issues in 1.13.1

2016-11-02 Thread 'Konstantin Orekhov' via Foreman users
Hmm, MySQL DB complains about the syntax of those queries: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ANALYZE SELECT DISTINCT `hosts`.`id` FROM `hosts` LEFT OUTER JOIN `host_status` ' at line 1 You have

Re: [foreman-users] Re: WebUI and API search performance issues in 1.13.1

2016-11-01 Thread 'Konstantin Orekhov' via Foreman users
> > >> or, even better if you are willing to share your database dump :) > > Sorry, I can't do 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] Re: Performance Problems on Webinterface /puppetclasses

2016-10-27 Thread 'Konstantin Orekhov' via Foreman users
Passenger tuning only helped with puppet runs, but not search problem. -- 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

Re: [foreman-users] Re: WebUI and API search performance issues in 1.13.1

2016-11-02 Thread 'Konstantin Orekhov' via Foreman users
OK, the first query returns this: 1 SIMPLE hosts ALL

Re: [foreman-users] Re: WebUI and API search performance issues in 1.13.1

2016-11-02 Thread 'Konstantin Orekhov' via Foreman users
The second one: 1 SIMPLE hosts ALL index_hosts_on_type NULL NULL NULL 1625 75.02 Using where 1 SIMPLE host_status ref index_host_status_on_host_id index_host_status_on_host_id 4 foreman.hosts.id 1 100.00 Using index 1 SIMPLE compute_resources eq_ref PRIMARY PRIMARY 4

[foreman-users] WebUI and API search performance issues in 1.13.1

2016-10-28 Thread 'Konstantin Orekhov' via Foreman users
Hello all! After upgrading to 1.13.1 today, I immediately noticed the huge delays in search through the hosts in both WebUI and API (the latter is actually worse than WebUI). Here are few examples: # time curl -kSs -u admin:$PASS https://localhost/api/hosts | jq '.' | grep total "total":

Re: [foreman-users] Sharing common puppet modules between multiple environments in Foreman

2016-10-11 Thread 'Konstantin Orekhov' via Foreman users
> > > The module should be at /etc/puppet/environments/common/ntp/ or > /etc/puppet/modules/ntp/. What are the paths of the modules you've added? > > Hmm, since my common environment is a real environment, its modules are under /etc/puppet/environments/common/*modules*/. The same directory

Re: [foreman-users] Sharing common puppet modules between multiple environments in Foreman

2016-10-13 Thread 'Konstantin Orekhov' via Foreman users
Hi, Dominic! Anything you can think of as the next steps in this situation? On Tuesday, October 11, 2016 at 11:06:36 AM UTC-7, Konstantin Orekhov wrote: > > >> The module should be at /etc/puppet/environments/common/ntp/ or >> /etc/puppet/modules/ntp/. What are the paths of the modules you've

Re: [foreman-users] Sharing common puppet modules between multiple environments in Foreman

2016-12-07 Thread 'Konstantin Orekhov' via Foreman users
Sorry for a late reply here - got distracted by other things. Thank you very much, Dominic! This indeed solved my problem with sharing common modules between environments. -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from

Re: [foreman-users] Re: Occasional ERF50-7522 on facts_refresh

2017-04-19 Thread 'Konstantin Orekhov' via Foreman users
m is eventually able to finish registration. Thanks! Konstantin. > On Apr 19, 2017, at 02:05, Lukas Zapletal <l...@redhat.com> wrote: > > Hey, unfortunately I do not see "Unable to get facts from proxy" in your log > at all. > > LZ > >> On Mon,

Re: [foreman-users] Re: Occasional ERF50-7522 on facts_refresh

2017-04-17 Thread 'Konstantin Orekhov' via Foreman users
ot exception is swallowed so I can't tell what is wrong. Can you manually apply this patch on your instance and retest, send me production.log again. https://github.com/theforeman/foreman_discovery/pull/338 It's oneliner, exception block only. LZ On Fri, Apr 7, 2017 at 8:36 PM, 'Konstantin Orekhov' via F

[foreman-users] Re: Occasional ERF50-7522 on facts_refresh

2017-03-01 Thread 'Konstantin Orekhov' via Foreman users
> > On my 1.14.1 Foreman I occasionally see facts_refresh for a newly > registered node failing with this error: > > >- *Error: *ERF50-7522 [Foreman::WrappedException]: Failed to refresh >facts for mac90e2bac5b1a0 with error Could not get facts from proxy >

Re: [foreman-users] Re: Occasional ERF50-7522 on facts_refresh

2017-04-07 Thread 'Konstantin Orekhov' via Foreman users
> Do you have some extra plugins installed? Like OpenSCAP? I cannot > reproduce here. > List of installed plug-ins: This

Re: [foreman-users] Re: Occasional ERF50-7522 on facts_refresh

2017-05-15 Thread 'Konstantin Orekhov' via Foreman users
Hi, guys! Didn't get a chance to look into this until to today, but here are the results. Tried dirty patching first - did not help as after patching the message on a client side changed to this: Discovered by URL: https://spc.vip Registering host with Foreman (https://spc.vip) Response from

Re: [foreman-users] Re: Occasional ERF50-7522 on facts_refresh

2017-05-22 Thread 'Konstantin Orekhov' via Foreman users
You forgot the question mark, did you? Or maybe I did in the previous > mail, anyway its really this: > > respond_to?(:reports) > > I don't think so, but I just repeated the patching just in case: # diff

Re: [foreman-users] Re: Occasional ERF50-7522 on facts_refresh

2017-05-19 Thread 'Konstantin Orekhov' via Foreman users
> 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:

[foreman-users] Re: Foreman 1.14.3 UI - Cannot create new host (or provision a new host from a discovered host)

2017-05-19 Thread 'Konstantin Orekhov' via Foreman users
LOL, with debugging on we quickly found the issue: 2017-05-19 12:05:01 0c04f9fc [app] [W] Unable to render PXELinux template 'custom_Ubuntu_PXELinux': undefined local variable or method `request' for # | NameError: undefined local variable or method `request' for # |

[foreman-users] Re: foreman_hooks: different json output on create and destroy

2017-06-01 Thread 'Konstantin Orekhov' via Foreman users
> But in 1.15.0 and even 1.14.3 it is like this: > > { > "host": { > "host": { > "ip": "10.109.236.95", > "ip6": "", > "environment_id": 2, > "environment_name": "common", > "last_report": "2017-05-31 12:23:46 -0700", > "mac": "52:54:00:c7:da:da", >

[foreman-users] Re: foreman_hooks: different json output on create and destroy

2017-05-31 Thread 'Konstantin Orekhov' via Foreman users
> Running 1.15 with foreman_hooks, and the json output to my hooks is > different between a 'create' and 'destroy' event. In the 'destroy' event I > am missing host parameters from the json output, but I can't find the > reason for this in the code. > > Anybody here know why this is? > > I

Re: [foreman-users] Re: Occasional ERF50-7522 on facts_refresh

2017-05-02 Thread 'Konstantin Orekhov' via Foreman users
> > It's a bug in > https://github.com/theforeman/foreman_default_hostgroup/blob/develop/lib/default_hostgroup_base_host_patch.rb#L66 > > where it expects "reports" to be present > > 2017-04-17 11:48:26 e3962d8a [app] [D] undefined local variable or method > `reports' for # > | >

[foreman-users] Re: foreman_hooks: different json output on create and destroy

2017-06-05 Thread 'Konstantin Orekhov' via Foreman users
in 1.14.3 I also see that after_commit event JSON has changed from: jq '.' mace41d2d1d6c30-after_commit-20170605-14-38-18-1496698698.json | head { "discovered_host": { "facts_hash": { "lib": "/var/www/minios/local/facter:/var/www/minios/foreman", "architecture": "amd64",

[foreman-users] Re: foreman_hooks: different json output on create and destroy

2017-06-05 Thread 'Konstantin Orekhov' via Foreman users
in 1.14.3 I also see that after_commit event JSON has changed from: jq '.' mace41d2d1d6c30-after_commit-20170605-14-38-18-1496698698.json | head { "discovered_host": { "facts_hash": { "architecture": "amd64", "augeasversion": "1.2.0", "discovery_version": "3.0.5",

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

2017-09-15 Thread 'Konstantin Orekhov' via Foreman users
> > 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).

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

2017-09-19 Thread 'Konstantin Orekhov' via Foreman users
Here you go, Lukas (just one host that can't register and keeps on retrying): 2017-09-19 11:45:55 5de80a14 [audit] [I] [mac3cfdfe52252c] deleted 0 (1898.9ms) 2017-09-19 11:45:56 5de80a14 [audit] [I] [mac3cfdfe52252c] updated 0 (575.8ms) 2017-09-19 11:45:56 5de80a14 [audit] [I]

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

2017-09-19 Thread 'Konstantin Orekhov' via Foreman users
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

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

2017-09-19 Thread 'Konstantin Orekhov' via Foreman users
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

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

2017-09-20 Thread 'Konstantin Orekhov' via Foreman users
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

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

2017-09-14 Thread 'Konstantin Orekhov' via Foreman users
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

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

2017-09-18 Thread 'Konstantin Orekhov' via Foreman users
This is how it looks in WebUI: Empties: And most of those empties would also have duplicates in this form: -- 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

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

2017-10-03 Thread 'Konstantin Orekhov' via Foreman users
> This is absolutely true. We had, at one time, considered adding a state > machine (or similar) to Foreman, so that such things (as well as boot > loops in Kickstart, and so forth) could be detected, but it was never > completed. > State machine would be nice as it allows for more actions

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

2017-10-10 Thread 'Konstantin Orekhov' via Foreman users
> > 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

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

2017-10-05 Thread 'Konstantin Orekhov' via Foreman users
> 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

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

2017-10-05 Thread 'Konstantin Orekhov' via Foreman users
> Let us know next week if this helped. I highly suggest upgrade to > 1.15, it is a very solid release. > > Is this patch for MySQL a part of 1.15? As you suggested, I've taken it from develop branch, so assumed it is not released yet. Plus, there are other 2 things that worry me: -

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

2017-10-05 Thread 'Konstantin Orekhov' via Foreman users
> > Agreed, a proper place to hook it would be ideal, I'm just throwing > ideas out that might help in the short term. > Sure, would be a nice thing to have to start from. -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe

[foreman-users] Re: Puppet Conf next week, who's going from Foreman

2017-10-05 Thread 'Konstantin Orekhov' via Foreman users
> Hi all, > > So Puppet Conf is just around the corner (10th), and as usual I'd like > to see if there's interest in a drinks meetup at some point during the > conf. Who's going that would be interested in an ad-hoc Foreman meetup? > > I may or may not attend PuppetConf, but will be

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

2017-10-09 Thread 'Konstantin Orekhov' via Foreman users
> please use git to find out which branches it landed in, I believe the > MySQL facter patch is 1.15+ only. > Yes, I already found that and am planning on an upgrade in our lab instance. BTW, even after applying a patch (on 1.14), which helped tremendously, from time to time I still get some

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

2017-10-04 Thread 'Konstantin Orekhov' via Foreman users
> 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

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

2017-10-18 Thread 'Konstantin Orekhov' via Foreman users
> In the console with both records presnet do something like: > > ::Nic::Managed.where(:mac => "MA:CA:DDRESS::", :primary => true) > > 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

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

2017-10-25 Thread 'Konstantin Orekhov' via Foreman users
> > 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

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

2017-10-26 Thread 'Konstantin Orekhov' via Foreman users
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,