Skip to content

Instantly share code, notes, and snippets.

View cben's full-sized avatar

Beni Cherniavsky-Paskin cben

View GitHub Profile

What happens at places marked COLLISION?

Currently kubeclient @entities hash is keyed by singular name, so if collision is on singular name, as for processedtemplates/templates:

# template.openshift.io/v1			openshift-origin-v3.6.0/apis/template.openshift.io/v1/index.json
	template	processedtemplates	
	template	templates	COLLISION

the last one wins — the earlier processedtemplates methods are not defined at all, only the latter template and templates methods!

@cben
cben / foo-4x6z5-uninstall-j6tvb
Created December 3, 2018 21:49
openshift/hive uninstaller logs without aws credentials
time="2018-12-03T20:56:56Z" level=debug msg="Deleting PVs (map[kubernetes.io/cluster/foo:owned])"
time="2018-12-03T20:56:56Z" level=debug msg="Deleting EIPs (map[tectonicClusterID:ad3527db-3741-4833-b198-56c2db57cbe2])"
time="2018-12-03T20:56:56Z" level=debug msg="Deleting EIPs (map[kubernetes.io/cluster/foo:owned])"
time="2018-12-03T20:56:56Z" level=debug msg="Deleting NAT Gateways (map[kubernetes.io/cluster/foo:owned])"
time="2018-12-03T20:56:56Z" level=debug msg="Deleting instances (map[kubernetes.io/cluster/foo:owned])"
time="2018-12-03T20:56:56Z" level=debug msg="Deleting VPCs (map[kubernetes.io/cluster/foo:owned])"
time="2018-12-03T20:56:56Z" level=debug msg="Deleting IAM resources (map[tectonicClusterID:ad3527db-3741-4833-b198-56c2db57cbe2])"
time="2018-12-03T20:56:56Z" level=debug msg="deleting role: foo-4x6z5-master-role"
time="2018-12-03T20:56:56Z" level=debug msg="Deleting IAM resources (map[kubernetes.io/cluster/foo:owned])"
time="2018-12-03T20:56:56Z" level=debug msg="deleting role: foo-4x6z5-mas
@cben
cben / failures.txt
Created November 20, 2018 11:59
https://github.com/ManageIQ/manageiq-providers-kubernetes/pull/304 but with old logic, on hammer that now includes #299
Failures:
1) ManageIQ::Providers::Kubernetes::ContainerManager::Scanning::Job A single Container Scan Job, completes successfully should report success
Failure/Error: message = target_entity.last_scan_result.scan_result_message
NoMethodError:
undefined method `scan_result_message' for nil:NilClass
# ./app/models/manageiq/providers/kubernetes/container_manager/scanning/job.rb:257:in `ensure in cleanup'
# ./app/models/manageiq/providers/kubernetes/container_manager/scanning/job.rb:260:in `cleanup'
# /home/bpaskinc/miq/hammer/app/models/job/state_machine.rb:34:in `signal'
@cben
cben / gem_make.out
Created November 7, 2018 11:54
rugged gem build problem
current directory: /home/bpaskinc/myenv/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rugged-0.27.5/ext/rugged
/home/bpaskinc/myenv/rbenv/versions/2.5.1/bin/ruby -r ./siteconf20181106-1925-1wcr5ki.rb extconf.rb
checking for gmake... yes
checking for cmake... yes
checking for pkg-config... yes
-- cmake .. -DBUILD_CLAR=OFF -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo
-- /usr/bin/gmake
checking for -lgit2... no
ERROR: Failed to build libgit2
*** extconf.rb failed ***
@cben
cben / 0.README.md
Created July 18, 2018 07:49
CentOS non-marketplace image AuthFailure

This was what I got for trying to run non-marketplace image per https://wiki.centos.org/Cloud/AWS:

| CentOS Linux 7 | 1801_01 | 2018-Jan-14 | us-east-1 | ami-4bf3d731 | x86_64 | HVM |

Note that "aws_access_key": null, and "aws_secret_key": null, are not the problem. They're not passed explicitly as module params but the module finds them in ~/.aws/credentials, and this worked later for a marketplace image.

@cben
cben / gist:c2a3a7d6e364d010e2b9f8825bb75087
Created July 11, 2018 11:05
oc log aws-machine-controller-1-gjv4b
nshneor@dhcp-2-169 ~/workspace/go/src/github.com/openshift/cluster-operator (master) $ oc project openshift-cluster-operator
Now using project "openshift-cluster-operator" on server "https://127.0.0.1:8443".
nshneor@dhcp-2-169 ~/workspace/go/src/github.com/openshift/cluster-operator (master) $ oc get pods
NAME READY STATUS RESTARTS AGE
aws-machine-controller-1-gjv4b 1/1 Running 0 26m
cluster-api-controller-manager-7dddc65c96-4z7px 1/1 Running 0 30m
cluster-operator-apiserver-1-6pcgz 2/2 Running 0 26m
cluster-operator-controller-manager-1-tz9cb 1/1 Running 0 26m
playbook-mock-6bf5c6f9d6-mnhms 1/1 Running 0 26m
nshneor@dhcp-2-169 ~/workspace/go/src/github.com/openshift/cluster-operator (master) $ oc log aws-machine-controller-1-gjv4b
@cben
cben / 0.README.md
Created April 18, 2018 15:59
ansible test/sanity/validate-modules/main.py spurious E324 with suboptions

ansible-test sanity --test validate-modules manageiq_dynamic_resource_definition

doc dict is:

{'author': 'Ahmed Bashir (@ahmbas)',
 'description': ['The manageiq_dynamic_resource_definition module supports adding, updating and deleting dynamic resource definitions in ManageIQ.'],
 'module': 'manageiq_dynamic_resource_definition',
 'options': {u'manageiq_connection': {u'description': [u'ManageIQ connection configuration information.'],
$ ag 'def scan' -w . plugins/*
app/models/vm_or_template/scanning.rb
5: def scan(userid = "system", options = {})
app/models/ems_cluster.rb
212: def scan
app/models/storage.rb
366: def scan(userid = "system", _role = "ems_operations")
~/miq/PLU/manageiq-providers-ovirt ((811201b3…)|…) $ bundle exec rake
Randomized with seed 62429
WARNING: Use of `have_attributes` with array access (:[]) is deprecated and will be removed shortly.
If you're matching attributes in hashes, use appropriate hash matchers instead (`include`, `eq`).
Called from /home/bpaskinc/miq/PLUGINS/manageiq-providers-ovirt/spec/models/manageiq/providers/redhat/infra_manager/event_catcher/runner_spec.rb:17:in `block (4 levels) in <top (required)>'
.
WARNING: Use of `have_attributes` with array access (:[]) is deprecated and will be removed shortly.
If you're matching attributes in hashes, use appropriate hash matchers instead (`include`, `eq`).
@cben
cben / gist:077f9d0c5dbfec31377ca66286bc5212
Created February 6, 2018 13:21
tests error: undefined local variable or method `waiting' for #<VmdbDatabaseConnection:0x0055d15468c998>
~/miq/master (kubeclient-2.5|…) $ bundle exec rspec ./spec/models/vmdb_database_spec.rb ./spec/models/vmdb_database_connection_spec.rb
Randomized with seed 745
...The version of PostgreSQL being connected to is incompatible with ManageIQ (9.6+ is not supported yet)
...........The version of PostgreSQL being connected to is incompatible with ManageIQ (9.6+ is not supported yet)
The version of PostgreSQL being connected to is incompatible with ManageIQ (9.6+ is not supported yet)
The version of PostgreSQL being connected to is incompatible with ManageIQ (9.6+ is not supported yet)
.....F.The version of PostgreSQL being connected to is incompatible with ManageIQ (9.6+ is not supported yet)
..............F