[foreman-users] Re: Error with Red Hat Repositories

2017-07-10 Thread Andrew Schofield
We see occasional issues similar to this (difficult to say if its exact or 
not). We tend to refresh the manifest and that seems to straighten things 
out.

On Monday, July 10, 2017 at 6:18:42 AM UTC-4, nd_dut...@yahoo.fr wrote:
>
> Hi,
>
> With Katello 3.4.2, there is an error with access to Red Hat Repositories 
> page :
>
> 2017-07-10 12:15:59 575301bc [app] [I] Processing by 
> Katello::ProvidersController#redhat_provider_tab as */*
> 2017-07-10 12:15:59 575301bc [app] [I]   Parameters: {"tab"=>"rpms"}
> 2017-07-10 12:15:59 575301bc [app] [I] Current user: admin (administrator)
> 2017-07-10 12:16:00 575301bc [app] [I]   Rendered 
> /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.2/app/views/katello/providers/redhat/_tab.html.erb
>  
> (1146.6ms)
> 2017-07-10 12:16:00 575301bc [app] [I] Completed 500 Internal Server Error 
> in 1281ms (ActiveRecord: 4.0ms)
> 2017-07-10 12:16:00 575301bc [app] [F]
>  | RestClient::ResourceNotFound (Katello::Resources::Candlepin::Product: 
> 404 Resource Not Found {"displayMessage":"Product with ID '179' could not 
> be found.","requestUuid":"3dedd070-2fd4-4e22-a0f6-4d672dcdb622"} (GET 
> /candlepin/owners/Geodis_RT/products/179/?include=name&include=
> attributes.name
> &include=attributes.value&include=productContent.content.contentUrl&include=productContent.content.label&include=productContent.content.modifiedProductIds&include=productContent.content.type&include=
> productContent.content.id&include=productContent.content.name)):
>  |   katello (3.4.2) app/lib/katello/http_resource.rb:84:in `get'
>  |   katello (3.4.2) app/lib/katello/resources/candlepin.rb:660:in `get'
>  |   katello (3.4.2) app/models/katello/glue/candlepin/product.rb:19:in 
> `block (2 levels) in included'
>  |   katello (3.4.2) app/lib/katello/lazy_accessor.rb:160:in 
> `instance_eval'
>  |   katello (3.4.2) app/lib/katello/lazy_accessor.rb:160:in 
> `run_initializer'
>  |   katello (3.4.2) app/lib/katello/lazy_accessor.rb:139:in 
> `lazy_attribute_get'
>  |   katello (3.4.2) app/lib/katello/lazy_accessor.rb:60:in `block (2 
> levels) in lazy_accessor'
>  |   katello (3.4.2) app/models/katello/glue/candlepin/product.rb:81:in 
> `displayable_product_contents'
>  |   katello (3.4.2) app/helpers/katello/providers_helper.rb:24:in `block 
> in redhat_repo_tab'
>  |   katello (3.4.2) app/helpers/katello/providers_helper.rb:23:in 
> `redhat_repo_tab'
>  |   katello (3.4.2) app/views/katello/providers/redhat/_tab.html.erb:1:in 
> `_41ea9beb3ddf17094c0928f9a41367ee'
>  |   katello (3.4.2) app/controllers/katello/providers_controller.rb:33:in 
> `redhat_provider_tab'
>  |   app/controllers/concerns/application_shared.rb:15:in `set_timezone'
>  |   app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in 
> `set_topbar_sweeper_controller'
>  |   katello (3.4.2) lib/katello/params_parser_wrapper.rb:12:in `call'
>  |   lib/middleware/catch_json_parse_errors.rb:8:in `call'
>  |   lib/middleware/tagged_logging.rb:18:in `call'
>  |
>  |
>
>
> There is several repos concerned :
>
> checking - Red Hat Developer Toolset for RHEL Workstation - PRODUCT ID: 14
> (hammer repository-set list --product-id 14)
> Katello::Resources::Candlepin::Product: 404 Resource Not Found 
> {"displayMessage":"Product with ID '179' could not be 
> found.","requestUuid":"551d803d-898d-44cd-9d1e-41331bbc8944"} (GET 
> /candlepin/owners/Geodis_RT/products/179/?include=name&include=
> attributes.name
> &include=attributes.value&include=productContent.content.contentUrl&include=productContent.content.label&include=productContent.content.modifiedProductIds&include=productContent.content.type&include=
> productContent.content.id&include=productContent.content.name)
>
> checking - Red Hat Software Collections Beta for RHEL Client - PRODUCT ID: 
> 11
> (hammer repository-set list --product-id 11)
> Katello::Resources::Candlepin::Product: 404 Resource Not Found 
> {"displayMessage":"Product with ID '206' could not be 
> found.","requestUuid":"447b1473-4972-455a-a4ac-cf327c44de43"} (GET 
> /candlepin/owners/Geodis_RT/products/206/?include=name&include=
> attributes.name
> &include=attributes.value&include=productContent.content.contentUrl&include=productContent.content.label&include=productContent.content.modifiedProductIds&include=productContent.content.type&include=
> productContent.content.id&include=productContent.content.name)
>
> checking - Red Hat Software Collections Beta for RHEL Workstation - 
> PRODUCT ID: 8
> (hammer repository-set list --product-id 8)
> Katello::Resources::Candlepin::Product: 404 Resource Not Found 
> {"displayMessage":"Product with ID '207' could not be 
> found.","requestUuid":"17007730-71d8-44d9-b37e-65178ab2aa70"} (GET 
> /candlepin/owners/Geodis_RT/products/207/?include=name&include=
> attributes.name
> &include=attributes.value&include=productContent.content.contentUrl&include=productContent.content.label&include=productContent.content.modifiedProductIds&include=productContent.content.type&incl

Re: [foreman-users] foreman-proxy 1.15 + Puppet 4.8.x

2017-07-10 Thread Michael Moll
Hi,

On Mon, Jul 10, 2017 at 01:48:21PM -0700, MK wrote:
> I'm testing Foreman 1.15 to work with Puppet 4.8.x in particularly on 
> Debian 9 (stretch) which was released few weeks back, Puppet 4.8.2 is the 
> version shipped with Debian 9.
> both Foreman+Puppet reside on the same box (all-in-one configuration), 
> seems to have got it up and run, until I tried to import the puppet classes 
> to Foreman,
> it does not find the environments along with the Puppet classes. 

See http://projects.theforeman.org/issues/19979
-- 
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.


[foreman-users] foreman-proxy 1.15 + Puppet 4.8.x

2017-07-10 Thread MK
Hi,

I'm testing Foreman 1.15 to work with Puppet 4.8.x in particularly on 
Debian 9 (stretch) which was released few weeks back, Puppet 4.8.2 is the 
version shipped with Debian 9.
both Foreman+Puppet reside on the same box (all-in-one configuration), 
seems to have got it up and run, until I tried to import the puppet classes 
to Foreman,
it does not find the environments along with the Puppet classes. 

Followed instruction 
on https://theforeman.org/manuals/1.15/index.html#4.3.6Puppet, I had 
following ocnfigured:

*(./setting.d/puppet.yml)*
:enabled: https
:puppet_version: 4.8.2

*(/etc/puppet/auth.conf)*
path /puppet/v3/environments
method find
allow *

path /puppet/v3/environment_classes
method find
allow *

path /puppet/v3/resource_type
method search
allow *

*(/etc/foreman-proxy/setting.d/puppet_proxy_legacy.yml)*
:puppet_conf: /etc/puppet/puppet.conf
:puppet_url: https://playbox.cs.nsls2.local:8140


Started debugging both Foreman-proxy as well as the Puppet Master, when 
foreman-proxy is trying to find the environments, production.log says:

E, [2017-07-10T16:18:56.142122 ] ERROR -- : Error while retrieving puppet 
classes for 'production' environment
D, [2017-07-10T16:18:56.142231 ] DEBUG -- : Could not find environment 
'production' (Proxy::Puppet::EnvironmentNotFound)
/usr/share/foreman-proxy/modules/puppet_proxy_puppet_api/v3_api_request.rb:27:in
 
`list_classes'
/usr/share/foreman-proxy/modules/puppet_proxy_puppet_api/v3_environment_classes_api_classes_retriever.rb:81:in
 
`block in async_get_classes'
/usr/lib/ruby/vendor_ruby/concurrent/executor/safe_task_executor.rb:24:in 
`block in execute'
/usr/lib/ruby/vendor_ruby/concurrent/synchronization/mri_lockable_object.rb:38:in
 
`block in synchronize'
/usr/lib/ruby/vendor_ruby/concurrent/synchronization/mri_lockable_object.rb:38:in
 
`synchronize'
/usr/lib/ruby/vendor_ruby/concurrent/synchronization/mri_lockable_object.rb:38:in
 
`synchronize'
/usr/lib/ruby/vendor_ruby/concurrent/executor/safe_task_executor.rb:19:in 
`execute'
/usr/lib/ruby/vendor_ruby/concurrent/promise.rb:526:in `block in realize'
/usr/lib/ruby/vendor_ruby/concurrent/executor/ruby_thread_pool_executor.rb:333:in
 
`run_task'
/usr/lib/ruby/vendor_ruby/concurrent/executor/ruby_thread_pool_executor.rb:322:in
 
`block (3 levels) in create_worker'
/usr/lib/ruby/vendor_ruby/concurrent/executor/ruby_thread_pool_executor.rb:305:in
 
`loop'
/usr/lib/ruby/vendor_ruby/concurrent/executor/ruby_thread_pool_executor.rb:305:in
 
`block (2 levels) in create_worker'
/usr/lib/ruby/vendor_ruby/concurrent/executor/ruby_thread_pool_executor.rb:304:in
 
`catch'
/usr/lib/ruby/vendor_ruby/concurrent/executor/ruby_thread_pool_executor.rb:304:in
 
`block in create_worker'
E, [2017-07-10T16:18:56.204027 ] ERROR -- : Error while retrieving puppet 
classes for 'common' environment
D, [2017-07-10T16:18:56.204108 ] DEBUG -- : Could not find environment 
'common' (Proxy::Puppet::EnvironmentNotFound)
/usr/share/foreman-proxy/modules/puppet_proxy_puppet_api/v3_api_request.rb:27:in
 
`list_classes'
/usr/share/foreman-proxy/modules/puppet_proxy_puppet_api/v3_environment_classes_api_classes_retriever.rb:81:in
 
`block in async_get_classes'
 (skip the repeatedly lines) ---


Puppet debug logged:
--
Jul 10 16:18:56 playbox puppet-master[18102]: Routes Registered:
Jul 10 16:18:56 playbox puppet-master[18102]: Route /^\/puppet\//
Jul 10 16:18:56 playbox puppet-master[18102]: Route /^\/puppet-ca\//
Jul 10 16:18:56 playbox puppet-master[18102]: Route /.*/
Jul 10 16:18:56 playbox puppet-master[18102]: Evaluating match for Route 
/^\/puppet\//
Jul 10 16:18:56 playbox puppet-master[18102]: Evaluating match for Route 
/v3/
Jul 10 16:18:56 playbox puppet-master[18102]: Evaluating match for Route 
/^\/environments$/
Jul 10 16:18:56 playbox puppet-master[18102]: Did not match path 
("/environment_classes")
Jul 10 16:18:56 playbox puppet-master[18102]: Evaluating match for Route 
/^\/environment\/[^\/]+$/
Jul 10 16:18:56 playbox puppet-master[18102]: Did not match path 
("/environment_classes")
Jul 10 16:18:56 playbox puppet-master[18102]: Evaluating match for Route 
/.*/
Jul 10 16:18:56 playbox puppet-master[18102]: Not Found: Could not find 
indirection 'environment_classe'
Jul 10 16:18:56 playbox puppet-master[18102]: Handling request: GET 
/puppet/v3/environment_classes?environment=production
Jul 10 16:18:56 playbox puppet-master[18102]: Routes Registered:
Jul 10 16:18:56 playbox puppet-master[18102]: Route /^\/puppet\//
Jul 10 16:18:56 playbox puppet-master[18102]: Route /^\/puppet-ca\//
Jul 10 16:18:56 playbox puppet-master[18102]: Route /.*/
Jul 10 16:18:56 playbox puppet-master[18102]: Evaluating match for Route 
/^\/puppet\//
Jul 10 16:18:56 playbox puppet-master[18102]: Evaluating match for Route 
/v3/
Jul 10 16:18:56 playbox puppet-master[18102]: Evaluating match for Route 
/^\/environments$/
Jul 10 16:18:56 playbox pupp

Re: [foreman-users] Re: Foreman-Openscap 0.7 functioning issues

2017-07-10 Thread sai krishna Khanday
Hi

In my situation I have manually changed the profile details in
/etc/foreman_scap_client/config.yaml file that's the reason I have faced
errors. I have then created a host group in foreman and assigned required
profile and ran puppet agent from CLI in respective node. Make sure you
provide correct cert details.

let me know how it went.

Sai Krishna

On Mon, Jul 10, 2017 at 7:05 AM, Phillip Smith  wrote:

> Hi
>
> I am having the exact same issue, have you found a solution yet?
>
>
> On Thursday, 15 June 2017 17:29:01 UTC+2, Sai Krishna wrote:
>>
>>
>> Hello everyone,
>>
>>
>> I have installed openscap plugin for existing foreman 1.15 and trying to
>> get the compliance report for a server, facing few issues during this
>> process.
>>
>> Having trouble assigning policy to host, its not loading to select the
>> existing policy.
>>
>> So I have tried from command line by running /usr/bin/foreman_scap_client
>> 1
>>
>> below is the confi file /etc/foreman_scap_client/config.yaml
>>
>> # DO NOT EDIT THIS FILE MANUALLY
>> # IT IS MANAGED BY PUPPET
>>
>> # Foreman proxy to which reports should be uploaded
>> :server: 'foremanproxy.example.com'
>> :port: 8443
>>
>> ## SSL specific options ##
>> # Client CA file.
>> # It could be Puppet CA certificate (e.g., '/var/lib/puppet/ssl/certs/ca.
>> pem')
>> # Or (recommended for client reporting to Katello) subscription manager
>> CA file, (e.g., '/etc/rhsm/ca/katello-server-ca.pem')
>> :ca_file: '/etc/puppetlabs/puppet/ssl/certs/ca.pem'
>> # Client host certificate.
>> # It could be Puppet agent host certificate (e.g.,
>> '/var/lib/puppet/ssl/certs/myhost.example.com.pem')
>> # Or (recommended for client reporting to Katello) consumer certificate
>> (e.g., '/etc/pki/consumer/cert.pem')
>> :host_certificate: '/etc/puppetlabs/puppet/ssl/certs/
>> localhost.example.com.pem'
>> # Client private key
>> # It could be Puppet agent private key (e.g.,
>> '/var/lib/puppet/ssl/private_keys/myhost.example.com.pem')
>> # Or (recommended for client reporting to Katello) consumer private key
>> (e.g., '/etc/pki/consumer/key.pem')
>> :host_private_key: '/etc/puppetlabs/puppet/ssl/pr
>> ivate_keys/localhost.example.com.pem'
>> # policy (key is id as in Foreman)
>>
>> 1:
>>   :profile: ''
>>   :content_path: '/usr/share/xml/scap/ssg/content/ssg-rhel7-ds.xml'
>>   # Download path
>>   # A path to download SCAP content from proxy
>>   :download_path: '/compliance/policies/1/content'
>>   :tailoring_path: ''
>>   :tailoring_download_path: ''
>>
>>
>> root localhost [~] # /usr/bin/foreman_scap_client 1
>> DEBUG: running: oscap xccdf eval  --results-arf
>> /tmp/d20170615-1073-zzt674/results.xml /usr/share/xml/scap/ssg/conten
>> t/ssg-rhel7-ds.xml
>> WARNING: Skipping http://www.redhat.com/security
>> /data/oval/Red_Hat_Enterprise_Linux_7.xml file which is referenced from
>> XCCDF content
>> DEBUG: running: /usr/bin/bzip2 /tmp/d20170615-1073-zzt674/results.xml
>> Uploading results to https://foreman.example.com:8443/compliance/arf/1
>>
>>
>>
>> At https://foreman.example.com:8443/compliance/arf/1  it through a
>> message as "  No client SSL certificate supplied "
>>
>>
>>
>> Below are logs from foreman-proxy server
>> /var/log/foreman-proxy/proxy.log
>>
>>
>> https://pastebin.com/uFLAZffP
>>
>>
>> Can anyone please help me with this.
>>
>> Thank you
>> Sai Krishna
>>
> --
> 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/TKcNVZQ4b4A/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.


Re: [foreman-users] Re: [foreman-dev] [event] Deep Dive: Running the Foreman Stack in Containers - Mon 10th July, 2pm (UK)

2017-07-10 Thread Eric D Helms
I did not get a chance to answer all the questions during the deep dive so
here is my follow up.

On Mon, Jul 3, 2017 at 8:20 AM, Ohad Levy  wrote:
>
>  * Current state and future Roadmap
>>
>
> I would be happy if you could also cover:
> - Smart proxy features (and how it works - e.g. a container per feature
> with base container etc).
>

I have not touched more of the core smart proxy feature management such as
DHCP and DNS yet.


> - Dev vs Production (whats in scope vs not)
>

I mentioned this in the video, but I'll recap. I have mostly targeted
production setups but there are known strategies for development. There are
a few ways we could consider and try to do development with this:

 1) ansible-container run is local docker and has a section for
dev_overrides [1]. With this you should point and mount source code
directly in when using 'run' (however, run does not entirely work currently
due to size of the setup)
 2) Openshift could have a host path mounted for development and allow
source code to be edited directly to use it as a dev environment
 3) Openshift has an rsync strategy to rsync a directory to a container for
development work

[1]
https://docs.ansible.com/ansible-container/container_yml/reference.html#dev-overrides


> - Installer - do we still need it in a context of a Kubernetes
> application?
>

I would say no given the current state of the installer. The installer is
designed around a single machine deployment currently. The puppet modules
themselves are not currently usable as they would each need to be tweaked
to allow for deploying no runtime configuration. We could then explore
trying to puppet apply them to build the containers. You could argue it is
bad on me to try to not re-use them due to all the work that has gone into
them. I just found starting from scratch and working with Ansible to be
easier and quicker than attempting to dissect them so far.

I do believe we still need an "installer" or "deployer" to orchestrate
everything being configured and setup for users. Our stack can get complex,
and between all the customization pieces, passwords, certificates, having a
tool to manage that would be useful for user interaction and ease.


> - SCL ? can we move away from it?
>

I think that's a big question. You are essentially asking can we move away
from RPM packaging (since Deb uses gems directly if I recall). There is a
valid argument for using gems directly. That would reduce build overhead,
allow for development and production to be closer to together and reduce
build time. We'd still want the SCL for runtime on enterprise Linux to
allow for upgrading the version of Ruby as I think that is better than
relying on RVM.


> - reuse? for example, https://github.com/manageiq?q=container have some
> basic ruby / rails containers etc
>

Sure, any container could be used as a base and built on top of. This would
come down to how much customization do we need or is there in an existing
container. Right now I build the entire stack, so every application gets a
container built except for using thirdparty Postgres and Mongodb.


> - application scaling ? (e.g. more dynflow workers etc).
>

I touched on this briefly, by default I am attempting to set services as
scaled by default to enforce getting used to and dealing with those
behaviors for scaling. For example, having 2 Foreman applications, 4 Pulp
workers by default. I have not yet tried a 2 or more foreman-tasks replica
yet. But I'll put it on my list to bump next spin up.

Eric


>
> sorry for the long list :)
>
> thanks,
> Ohad
>
>>
>>
>> Thanks,
>> Eric
>>
>>
>> [1] https://github.com/theforeman/forklift/pull/424
>>
>> On Thu, Jun 29, 2017 at 10:15 AM, Greg Sutcliffe <
>> greg.sutcli...@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> Running Foreman in a container is a question that comes up from time to
>>> time in the Foreman community. Eric Helms has been experimenting with
>>> running the whole Foreman stack (core, proxies, plugins) inside
>>> Kubernetes, and wants to show you how it looks. We'll be holding a deep
>>> dive into this on Monday 10th July, at 2pm (GMT +1). You can tune in
>>> here:
>>>
>>> https://www.youtube.com/watch?v=mPjUvNAYp1c
>>>
>>> As always, we welcome your contributions to the video - do join us live
>>> on YouTube Live chat or in our IRC channel to put your questions to
>>> Eric!
>>>
>>> Cheers,
>>> Greg
>>> --
>>> IRC / Twitter: @gwmngilfen
>>> Diaspora: gwmngil...@joindiaspora.com
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "foreman-dev" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to foreman-dev+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Eric D. Helms
>> Red Hat Engineering
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Foreman users" group.
>> To unsubscribe from this group and stop receivin

[foreman-users] Re: Foreman-Openscap 0.7 functioning issues

2017-07-10 Thread Phillip Smith
Hi

I am having the exact same issue, have you found a solution yet?

On Thursday, 15 June 2017 17:29:01 UTC+2, Sai Krishna wrote:
>
>
> Hello everyone,
>
>
> I have installed openscap plugin for existing foreman 1.15 and trying to 
> get the compliance report for a server, facing few issues during this 
> process.
>
> Having trouble assigning policy to host, its not loading to select the 
> existing policy. 
>
> So I have tried from command line by running /usr/bin/foreman_scap_client 1
>
> below is the confi file /etc/foreman_scap_client/config.yaml
>
> # DO NOT EDIT THIS FILE MANUALLY
> # IT IS MANAGED BY PUPPET
>
> # Foreman proxy to which reports should be uploaded
> :server: 'foremanproxy.example.com'
> :port: 8443
>
> ## SSL specific options ##
> # Client CA file.
> # It could be Puppet CA certificate (e.g., 
> '/var/lib/puppet/ssl/certs/ca.pem')
> # Or (recommended for client reporting to Katello) subscription manager CA 
> file, (e.g., '/etc/rhsm/ca/katello-server-ca.pem')
> :ca_file: '/etc/puppetlabs/puppet/ssl/certs/ca.pem'
> # Client host certificate.
> # It could be Puppet agent host certificate (e.g., 
> '/var/lib/puppet/ssl/certs/myhost.example.com.pem')
> # Or (recommended for client reporting to Katello) consumer certificate 
> (e.g., '/etc/pki/consumer/cert.pem')
> :host_certificate: 
> '/etc/puppetlabs/puppet/ssl/certs/localhost.example.com.pem'
> # Client private key
> # It could be Puppet agent private key (e.g., 
> '/var/lib/puppet/ssl/private_keys/myhost.example.com.pem')
> # Or (recommended for client reporting to Katello) consumer private key 
> (e.g., '/etc/pki/consumer/key.pem')
> :host_private_key: 
> '/etc/puppetlabs/puppet/ssl/private_keys/localhost.example.com.pem'
> # policy (key is id as in Foreman)
>
> 1:
>   :profile: ''
>   :content_path: '/usr/share/xml/scap/ssg/content/ssg-rhel7-ds.xml'
>   # Download path
>   # A path to download SCAP content from proxy
>   :download_path: '/compliance/policies/1/content'
>   :tailoring_path: ''
>   :tailoring_download_path: ''
>
>
> root localhost [~] # /usr/bin/foreman_scap_client 1
> DEBUG: running: oscap xccdf eval  --results-arf 
> /tmp/d20170615-1073-zzt674/results.xml 
> /usr/share/xml/scap/ssg/content/ssg-rhel7-ds.xml
> WARNING: Skipping 
> http://www.redhat.com/security/data/oval/Red_Hat_Enterprise_Linux_7.xml 
> file which is referenced from XCCDF content
> DEBUG: running: /usr/bin/bzip2 /tmp/d20170615-1073-zzt674/results.xml
> Uploading results to https://foreman.example.com:8443/compliance/arf/1
>
>
>
> At https://foreman.example.com:8443/compliance/arf/1  it through a 
> message as "  No client SSL certificate supplied "
>
>
>
> Below are logs from foreman-proxy server
> /var/log/foreman-proxy/proxy.log
>
>
> https://pastebin.com/uFLAZffP
>
>
> Can anyone please help me with this.
>
> Thank you 
> Sai Krishna 
>

-- 
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] Error with Red Hat Repositories

2017-07-10 Thread nd_dutyd2005 via Foreman users
Hi,

With Katello 3.4.2, there is an error with access to Red Hat Repositories 
page :

2017-07-10 12:15:59 575301bc [app] [I] Processing by 
Katello::ProvidersController#redhat_provider_tab as */*
2017-07-10 12:15:59 575301bc [app] [I]   Parameters: {"tab"=>"rpms"}
2017-07-10 12:15:59 575301bc [app] [I] Current user: admin (administrator)
2017-07-10 12:16:00 575301bc [app] [I]   Rendered 
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.2/app/views/katello/providers/redhat/_tab.html.erb
 
(1146.6ms)
2017-07-10 12:16:00 575301bc [app] [I] Completed 500 Internal Server Error 
in 1281ms (ActiveRecord: 4.0ms)
2017-07-10 12:16:00 575301bc [app] [F]
 | RestClient::ResourceNotFound (Katello::Resources::Candlepin::Product: 
404 Resource Not Found {"displayMessage":"Product with ID '179' could not 
be found.","requestUuid":"3dedd070-2fd4-4e22-a0f6-4d672dcdb622"} (GET 
/candlepin/owners/Geodis_RT/products/179/?include=name&include=attributes.name&include=attributes.value&include=productContent.content.contentUrl&include=productContent.content.label&include=productContent.content.modifiedProductIds&include=productContent.content.type&include=productContent.content.id&include=productContent.content.name)):
 |   katello (3.4.2) app/lib/katello/http_resource.rb:84:in `get'
 |   katello (3.4.2) app/lib/katello/resources/candlepin.rb:660:in `get'
 |   katello (3.4.2) app/models/katello/glue/candlepin/product.rb:19:in 
`block (2 levels) in included'
 |   katello (3.4.2) app/lib/katello/lazy_accessor.rb:160:in `instance_eval'
 |   katello (3.4.2) app/lib/katello/lazy_accessor.rb:160:in 
`run_initializer'
 |   katello (3.4.2) app/lib/katello/lazy_accessor.rb:139:in 
`lazy_attribute_get'
 |   katello (3.4.2) app/lib/katello/lazy_accessor.rb:60:in `block (2 
levels) in lazy_accessor'
 |   katello (3.4.2) app/models/katello/glue/candlepin/product.rb:81:in 
`displayable_product_contents'
 |   katello (3.4.2) app/helpers/katello/providers_helper.rb:24:in `block 
in redhat_repo_tab'
 |   katello (3.4.2) app/helpers/katello/providers_helper.rb:23:in 
`redhat_repo_tab'
 |   katello (3.4.2) app/views/katello/providers/redhat/_tab.html.erb:1:in 
`_41ea9beb3ddf17094c0928f9a41367ee'
 |   katello (3.4.2) app/controllers/katello/providers_controller.rb:33:in 
`redhat_provider_tab'
 |   app/controllers/concerns/application_shared.rb:15:in `set_timezone'
 |   app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in 
`set_topbar_sweeper_controller'
 |   katello (3.4.2) lib/katello/params_parser_wrapper.rb:12:in `call'
 |   lib/middleware/catch_json_parse_errors.rb:8:in `call'
 |   lib/middleware/tagged_logging.rb:18:in `call'
 |
 |


There is several repos concerned :

checking - Red Hat Developer Toolset for RHEL Workstation - PRODUCT ID: 14
(hammer repository-set list --product-id 14)
Katello::Resources::Candlepin::Product: 404 Resource Not Found 
{"displayMessage":"Product with ID '179' could not be 
found.","requestUuid":"551d803d-898d-44cd-9d1e-41331bbc8944"} (GET 
/candlepin/owners/Geodis_RT/products/179/?include=name&include=attributes.name&include=attributes.value&include=productContent.content.contentUrl&include=productContent.content.label&include=productContent.content.modifiedProductIds&include=productContent.content.type&include=productContent.content.id&include=productContent.content.name)

checking - Red Hat Software Collections Beta for RHEL Client - PRODUCT ID: 
11
(hammer repository-set list --product-id 11)
Katello::Resources::Candlepin::Product: 404 Resource Not Found 
{"displayMessage":"Product with ID '206' could not be 
found.","requestUuid":"447b1473-4972-455a-a4ac-cf327c44de43"} (GET 
/candlepin/owners/Geodis_RT/products/206/?include=name&include=attributes.name&include=attributes.value&include=productContent.content.contentUrl&include=productContent.content.label&include=productContent.content.modifiedProductIds&include=productContent.content.type&include=productContent.content.id&include=productContent.content.name)

checking - Red Hat Software Collections Beta for RHEL Workstation - PRODUCT 
ID: 8
(hammer repository-set list --product-id 8)
Katello::Resources::Candlepin::Product: 404 Resource Not Found 
{"displayMessage":"Product with ID '207' could not be 
found.","requestUuid":"17007730-71d8-44d9-b37e-65178ab2aa70"} (GET 
/candlepin/owners/Geodis_RT/products/207/?include=name&include=attributes.name&include=attributes.value&include=productContent.content.contentUrl&include=productContent.content.label&include=productContent.content.modifiedProductIds&include=productContent.content.type&include=productContent.content.id&include=productContent.content.name)

checking - Red Hat Software Collections for RHEL Client - PRODUCT ID: 12
(hammer repository-set list --product-id 12)
Katello::Resources::Candlepin::Product: 404 Resource Not Found 
{"displayMessage":"Product with ID '202' could not be 
found.","requestUuid":"30569996-b026-4582-b19e-1467c76965a6"} (GET 
/candlepin/owners/Geodis_RT/products/

Re: [foreman-users] Getting list of hosts for a hostgroup, including subgroups via the API

2017-07-10 Thread Tomer Brisker
Hi,
You can get a list of all hosts in hostgroup or subgroups using searching
(both in the UI and API).
For example, of all of hostgroup named hg1 and subgroups you can use
"http://localhost:3000/api/v2/hosts?search=hostgroup_title~hg1*";
For only the subgroups:
"http://localhost:3000/api/v2/hosts?search=hostgroup_title~hg1/*";

The same search sting can also be used on the UI

On Mon, Jul 10, 2017 at 10:56 AM, Gerhardus Geldenhuis <
gerhardus.geldenh...@gmail.com> wrote:

> Hi
> I am trying to get a list of hosts that belong to a host group. However
> the hostgroup itself does not directly contain any hosts, the subgroups
> does however.
>
> Using the API I can get a list of hosts per hostgroup using
> https://localhost/api/hostgroups//hosts
> I can get a description of the hostgroup using /api/hostgroups/ number>
>
> What I can't seem to get is a list of subgroups using the API and thus no
> easy way of getting all the hosts in a parent group.
>
> Other than building my own hierarchy from api/hostgroups is there a way of
> getting all hosts including hosts in subgroups for a particular hostgroup?
>
> Regards
>
> --
> 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.
>



-- 
Have a nice day,
Tomer Brisker
Red Hat Engineering

-- 
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: Vm creation using API fails

2017-07-10 Thread Adam Ruzicka
Hello,
just some general ideas. Could you try with v2 api? You could also add
--verbose and --debug flags to hammer and look at what calls and with what
parameters it makes and try to recreate them with curl afterwards.

Adam

On Mon, Jul 10, 2017 at 7:14 AM, bijith nair  wrote:

> Guys,
>
> Could you please have a look?
>
> On Thursday, 29 June 2017 19:04:37 UTC+5:30, bijith nair wrote:
>
>> Hello Team,
>>
>> When i try to create vm using API's, It fails with below error..
>>
>> [root@oel6u5 ~]# curl -X POST -s -H "Accept:application/json" -k -u
>> admin:redhat -d "host[name]=mytestdev" -d "host[hostgroup_id]=4" -d
>> "host[compute_resource_id]=1" -d "host[powerup]=1"
>> https://192.168.133.210/api/v1/hosts/ | python -mjson.tool
>>   {
>> "host": {
>> "errors": {
>> "base": [
>> "Failed to create a compute Vmware GDC - Devops (VMware)
>> instance mytestdev.testlab.local: Unknown Network ID: \n "
>> ]
>> },
>> "full_messages": [
>> "Failed to create a compute Vmware GDC - Devops (VMware)
>> instance mytestdev.testlab.local: Unknown Network ID: \n "
>> ],
>> "id": null
>> }
>> }
>>
>> Though Hammer cli works fine, I see same error while deploying vm via UI
>> but  sumitting the job again fixes it but not happening with API
>>
>> 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.
>

-- 
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] Getting list of hosts for a hostgroup, including subgroups via the API

2017-07-10 Thread Gerhardus Geldenhuis
Hi
I am trying to get a list of hosts that belong to a host group. However the 
hostgroup itself does not directly contain any hosts, the subgroups does 
however.

Using the API I can get a list of hosts per hostgroup 
using https://localhost/api/hostgroups//hosts
I can get a description of the hostgroup using /api/hostgroups/ 

What I can't seem to get is a list of subgroups using the API and thus no 
easy way of getting all the hosts in a parent group. 

Other than building my own hierarchy from api/hostgroups is there a way of 
getting all hosts including hosts in subgroups for a particular hostgroup?

Regards

-- 
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] "Unknow function 'foreman'"

2017-07-10 Thread VladF
Hi, I have tried to use Foreman API for pull some data from foreman's 
database.
I write test_module and integrate it into Foreman:

class enc {

  $hosts = foreman("hostgroup=devops", "state=all")

  file {'/tmp/test.conf':
ensure  => present,
content => template('enc/test.erb'),
  }

}


When I try to do puppet agent -t one test node this error has occur:
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: 
Server Error: Evaluation Error: Error while evaluating a Resource 
Statement, Evaluation Error: Unknown function: 'foreman'. at 
/etc/puppetlabs/code/environments/production/modules/enc/manifests/init.pp:3:12 
on node centos-25


I have foreman.rb there: 
/usr/share/foreman-installer/modules/foreman/lib/puppet/parser/functions/foreman.rb

What's wrong?

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