Skip to content

Instantly share code, notes, and snippets.

View awead's full-sized avatar
🏠
Working from home

Adam Wead awead

🏠
Working from home
View GitHub Profile
fcrepo.activemq.dir fcrepo.binary-store-path fcrepo.ispn.repo.CacheDirPath
[root@ssrepo1stage SSstagingFedora4]# service tomcat stop
Stopping tomcat: [ OK ]
[root@ssrepo1stage SSstagingFedora4]# rm -Rf *
rm: cannot remove `fcrepo.ispn.repo.CacheDirPath/expiredFedoraRepository': Directory not empty
rm: cannot remove `fcrepo.ispn.repo.CacheDirPath/dataFedoraRepository': Directory not empty
[root@ssrepo1stage SSstagingFedora4]# ls
fcrepo.activemq.dir fcrepo.ispn.repo.CacheDirPath
[root@ssrepo1stage SSstagingFedora4]# find .
.
@awead
awead / gist:e322fec1be5d8375dff0
Created April 4, 2015 15:04
QA deploy issues
~/Projects/Github/psu-stewardship/scholarsphere (fm-master=)$ bundle exec cap qa deploy BRANCH_NAME=fm-master
** Invoke qa (first_time)
** Execute qa
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke rbenv:validate (first_time)
** Invoke rbenv:install (first_time)
** Execute rbenv:install
** Invoke rbenv:install_rbenv (first_time)
** Execute rbenv:install_rbenv
@awead
awead / gist:221c878bcee98c3959d6
Created April 7, 2015 14:41
Curl versus FedoraMigrate
when I do
$ curl http://xxxxxx:[email protected]:8080/SSqaFedora/objects/scholarsphere:x346d6982/datastreams/characterization/content
Tomcat logs show:
ss1stage.dlt.psu.edu - - [07/Apr/2015:10:37:23 -0400] "GET /SSqaFedora/objects/scholarsphere:x346d6982/datastreams/characterization/content HTTP/1.1" 200 3417
When I do:
> FedoraMigrate.find("scholarsphere:x346d6982").datastreams["characterization"].content
NoMemoryError: failed to allocate memory
/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.1.0/gems/rest-client-1.8.0/lib/restclient/request.rb:479:in `fetch_body'
/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.1.0/gems/rest-client-1.8.0/lib/restclient/request.rb:419:in `block (2 levels) in transmit'
/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.1.284/lib/new_relic/agent/instrumentation/net.rb:27:in `block (2 levels) in request_with_newrelic_trace'
/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.1.284/lib/new_relic/agent.rb:461:in `disable_all_tracing'
/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.1.284/lib/new_relic/agent/instrumentation/net.rb:26:in `block in request_with_newrelic_trace'
/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.1.284/lib/new_relic/agent/cross_app_tracing.rb:48:in `tl_trace_http_request'
/opt/heracles/deploy/scholarsphere/shared
@awead
awead / gist:2abdeae5e54e37abb101
Last active October 6, 2017 08:11
Relationship problems
FIXED: scholarsphere_5712m9310.json: "could not migrate relationship info:fedora/fedora-system:def/relations-external#hasCollectionMember because info:fedora/scholarsphere:x346dm27k doesn't exist in Fedora 4",
None of the objects liste in "info:fedora" existed in F3, so the originating object is just reporting that it couldn't find it
scholarsphere_5712md645.json: "could not migrate relationship info:fedora/fedora-system:def/relations-external#hasCollectionMember because info:fedora/scholarsphere:5712md424 doesn't exist in Fedora 4",
scholarsphere_8623j0886.json: "could not migrate relationship info:fedora/fedora-system:def/relations-external#hasCollectionMember because info:fedora/scholarsphere:p8418n21v doesn't exist in Fedora 4"
scholarsphere_sf268c193.json: "could not migrate relationship info:fedora/fedora-system:def/relations-external#hasCollectionMember because info:fedora/scholarsphere:x346d6761 doesn't exist in Fedora 4",
scholarsphere_x346d683f.json: "could not migrate relationship
@awead
awead / gist:20b7f6634aa677e2994a
Created April 11, 2015 19:55
Staging versus Production
Here's a sample of the data transfered from Fedora 3 to Fedora 4. The staging set represents week-old production data, with batches, the prod. example is the most up-to-date production Fedora 3 data but without empty batches:
SSstagingRails:
select count(id), f3_model from migrate_audits group by f3_model
+-----------+---------------------------------+
| count(id) | f3_model |
+-----------+---------------------------------+
| 2072 | info:fedora/afmodel:Batch |
| 101 | info:fedora/afmodel:Collection |
| 3972 | info:fedora/afmodel:GenericFile |
@awead
awead / gist:3dc4db181b8e5196ea27
Created April 28, 2015 15:30
Second cap command
~/Projects/Github/psu-stewardship/scholarsphere (master=)$ bundle exec cap staging deploy BRANCH_NAME=master --hosts ss1stage.dlt.psu.edu
** Invoke staging (first_time)
** Execute staging
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke rbenv:validate (first_time)
** Invoke rbenv:install (first_time)
** Execute rbenv:install
** Invoke rbenv:install_rbenv (first_time)
** Execute rbenv:install_rbenv
~/Projects/Github/psu-stewardship/archivesphere (poltergeist *%)$ bundle exec rspec spec/features/
/Users/awead/.gem/ruby/2.1.5/gems/rubyzip-0.9.9/lib/zip/constants.rb:2: warning: already initialized constant Zip::VERSION
DEPRECATION WARNING: You didn't set config.secret_key_base. Read the upgrade documentation to learn more about this new config option. (called from service at /Users/awead/.rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:138)
FF...F.F
Failures:
1) Creating a new accession should be successful
Failure/Error: click_on "Create Collection"
Capybara::Poltergeist::JavascriptError:
describe "class names that are literals" do
before :all do
class GenericAsset < ActiveFedora::Base
property :set, predicate: ::RDF::DC.title, class_name: "Set"
end
end
after :all do
Object.send(:remove_const, :GenericAsset)
** [out :: as1qa.dlt.psu.edu]
** [out :: as1qa.dlt.psu.edu] --------------------------------------------
** [out :: as1qa.dlt.psu.edu]
** [out :: as1qa.dlt.psu.edu] Checking whether there are multiple Apache installations...
** [out :: as1qa.dlt.psu.edu] AH00526: Syntax error on line 47 of /etc/httpd/conf.d/vhost-archivesphere-qa.conf:
** [out :: as1qa.dlt.psu.edu] An error occured reading the Keyfile.
** [out :: as1qa.dlt.psu.edu] AH00526: Syntax error on line 47 of /etc/httpd/conf.d/vhost-archivesphere-qa.conf:
** [out :: as1qa.dlt.psu.edu] An error occured reading the Keyfile.
** [out :: as1qa.dlt.psu.edu] AH00526: Syntax error on line 47 of /etc/httpd/conf.d/vhost-archivesphere-qa.conf:
** [out :: as1qa.dlt.psu.edu] An error occured reading the Keyfile.