Skip to content

Instantly share code, notes, and snippets.

== 20201125113903 MigratePuppetclassesToFacets: migrating =====================
-- add_reference(:host_classes, :host_puppet_facet, {:foreign_key=>true, :index=>true})
-> 0.0142s
-- add_reference(:hostgroup_classes, :hostgroup_puppet_facet, {:foreign_key=>true, :index=>true})
-> 0.0102s
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
undefined method `id' for nil:NilClass
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_puppet-1.0.0.rc.1/db/migrate/20201125113903_migrate_puppetclasses_to_facets.foreman_puppet.rb:17:in `block in up'
Jul 21 15:47:59 foreman-nuc2 pulpcore-content: [2021-07-21 13:47:59 +0000] [21931] [ERROR] Error handling request
Jul 21 15:47:59 foreman-nuc2 pulpcore-content: Traceback (most recent call last):
Jul 21 15:47:59 foreman-nuc2 pulpcore-content: File "/usr/lib64/python3.6/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
Jul 21 15:47:59 foreman-nuc2 pulpcore-content: resp = await self._request_handler(request)
Jul 21 15:47:59 foreman-nuc2 pulpcore-content: File "/usr/lib64/python3.6/site-packages/aiohttp/web_app.py", line 499, in _handle
Jul 21 15:47:59 foreman-nuc2 pulpcore-content: resp = await handler(request)
Jul 21 15:47:59 foreman-nuc2 pulpcore-content: File "/usr/lib/python3.6/site-packages/pulpcore/content/handler.py", line 212, in stream_content
Jul 21 15:47:59 foreman-nuc2 pulpcore-content: return await self._match_and_stream(path, request)
Jul 21 15:47:59 foreman-nuc2 pulpcore-content: File "/usr/lib/python3.6/site-packages/pulpcore/content/handler.py", line 448, in _match_and_strea
[14:53:37] <mhulan> sajha: hello, I'm trying to sync some ansible collection to my nightly box, but when I try to create a repo, I'm getting ArgumentError: `proxy_username` is not a valid attribute in `PulpAnsibleClient::AnsibleCollectionRemote`. Please check the name to make sure it's valid. List of attributes: ...
[14:53:40] <mhulan> is that a known issue?
[14:53:46] <mhulan> google didn't help much
[14:55:24] <sajha> Haven't seen that before..checking..
[14:55:36] <mhulan> I can share the reproducing env if you want to look around
[14:57:07] <sajha> mhulan: Are you using some HTTP proxy in the setup?
[14:57:21] <mhulan> no, I selected no HTTP Proxy (though I think one is defined)
[14:58:47] <mhulan> it may have been that I kept proxy for the first repo though, let me clean those first
[15:00:19] <mhulan> so keeping "Global Default (None)" as the HTTP Proxy Policy
[15:00:27] <mhulan> getting the same error
diff --git a/app/models/job_invocation.rb b/app/models/job_invocation.rb
index 8fba060..fa30dc7 100644
--- a/app/models/job_invocation.rb
+++ b/app/models/job_invocation.rb
@@ -28,6 +28,9 @@ class JobInvocation < ApplicationRecord
has_many :template_invocations_hosts, :through => :template_invocations, :source => :host
scoped_search :relation => :template_invocations_hosts, :on => :name, :rename => 'host', :complete_value => true
+ has_many :targeting_hosts_relation, :through => :targeting, :source => :targeting_hosts
+ has_many :targeting_hosts, :through => :targeting_hosts_relation, :source => :host
diff --git a/lib/foreman_ansible_core/runner/ansible_runner.rb b/lib/foreman_ansible_core/runner/ansible_runner.rb
index a8f39257b..5d1083822 100644
--- a/lib/foreman_ansible_core/runner/ansible_runner.rb
+++ b/lib/foreman_ansible_core/runner/ansible_runner.rb
@@ -14,12 +14,14 @@ module ForemanAnsibleCore
@verbosity_level = action_input[:verbosity_level]
@rex_command = action_input[:remote_execution_command]
@check_mode = action_input[:check_mode]
+ @passphrase = action_input['secrets']['key_passphrase']
end
Traceback (most recent call last):
File "/usr/bin/pulpcore-manager", line 11, in <module>
load_entry_point('pulpcore==3.11.0', 'console_scripts', 'pulpcore-manager')()
File "/usr/lib/python3.6/site-packages/pulpcore/app/manage.py", line 11, in manage
execute_from_command_line(sys.argv)
File "/usr/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/lib/python3.6/site-packages/django/core/management/__init__.py", line 325, in execute
settings.INSTALLED_APPS
File "/usr/lib/python3.6/site-packages/django/conf/__init__.py", line 79, in __getattr__
diff --git a/app/services/setting_registry.rb b/app/services/setting_registry.rb
index 671117647..4d7fbc5ae 100644
--- a/app/services/setting_registry.rb
+++ b/app/services/setting_registry.rb
@@ -66,7 +66,7 @@ class SettingRegistry
def load_values
loaded_names = []
- Setting.unscoped.all.each do |s|
+ Setting.unscoped.where(category: Setting.subclasses.map(&:to_s)).each do |s|
echo "{ \"oval_content\": { \"scap_file\": \"$(base64 -w 0 ~/satellite-tools-6.9.oval.xml.bz2)\" } }" | curl -H "Accept: application/json" -H "Content-Type: application/json" -k -X POST -u admin:changeme https://foreman.example.tst/api/v2/compliance/oval_contents -d @- | json_reformat
2021-04-21T16:19:13 [I|app|76fc52e9] Started POST "/api/v2/compliance/oval_contents" for 192.168.122.1 at 2021-04-21 16:19:13 +0200
2021-04-21T16:19:13 [I|app|76fc52e9] Processing by Api::V2::Compliance::OvalContentsController#create as JSON
2021-04-21T16:19:13 [I|app|76fc52e9] Parameters: {"oval_content"=>{"scap_file"=>"[FILTERED]"}, "apiv"=>"v2"}
2021-04-21T16:19:13 [D|sql|76fc52e9] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."lower_login" = $1 LIMIT $2 [["lower_login", "admin"], ["LIMIT", 1]]
2021-04-21T16:19:13 [D|sql|76fc52e9] ↳ app/models/user.rb:361:in `find_by_login'
2021-04-21T16:19:13 [D|sql|76fc52e9] Setting Load (0.5ms) SELECT "settings".* FROM "settings" WHERE "settings"."name" = $1 O
{
"aio_agent_version": "6.21.1",
"augeas": {
"version": "1.12.0"
},
"disks": {
"sda": {
"model": "ADATA SP600NS34",
"size": "238.47 GiB",
"size_bytes": 256060514304,
úno 04 19:32:42 foreman-nuc2.example.com server[9192]: Feb 04, 2021 7:32:42 PM org.apache.catalina.core.StandardService startInternal
úno 04 19:32:42 foreman-nuc2.example.com server[9192]: INFO: Starting service Catalina
úno 04 19:32:42 foreman-nuc2.example.com server[9192]: Feb 04, 2021 7:32:42 PM org.apache.catalina.core.StandardEngine startInternal
úno 04 19:32:42 foreman-nuc2.example.com server[9192]: INFO: Starting Servlet Engine: Apache Tomcat/7.0.76
úno 04 19:32:42 foreman-nuc2.example.com server[9192]: Feb 04, 2021 7:32:42 PM org.apache.catalina.startup.HostConfig deployDirectory
úno 04 19:32:42 foreman-nuc2.example.com server[9192]: INFO: Deploying web application directory /var/lib/tomcat/webapps/candlepin
úno 04 19:32:46 foreman-nuc2.example.com server[9192]: Feb 04, 2021 7:32:46 PM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
úno 04 19:32:46 foreman-nuc2.example.com server[9192]: INFO: validateJarFile(/usr/share/tomcat/webapps/candlepin/WEB-INF/lib/javax.el-api-3.0.0.jar) - jar