view · edit · sidebar · attach · print · history

20131112-yus-without-needle

<< | Index | >>


Summary

  • Trying to make yus work without needle
  • Setup funtoo-oddb

Commits

Index

---

Setup funtoo-oddb

New PC arrived at 13 Uhr 15. Unpacking and installing as described yesterday. Mac-Address is ac:22:0b:cd:dd:f7. Registered http://oddb-ci2.dyndns.org to run it in parallel with my VM.

Additional setting:

  1. locale to de_CH.UTF-8
  2. keyboard sg
  3. eselect profile set-flavor 10 # funtoo/1.0/linux-gnu/flavor/hardened
  4. eselect profile add 12 # funtoo/1.0/linux-gnu/mix-ins/console-extras
  5. decided to use first a debian kernel. Will install all vanilla kernel afterwards. (Compiling the kernel used all 12 CPU threads)
  6. decided to use dhcp

At 14:54 I rebooted into my new funtoo system. IP/hostname from my DHCP-server were okay (172.25.1.75/oddb-ci2).

Now it is time to login via the network and continuing with the puppet installation and configuration. Had to correct a few paths in the readme.textile. At 15:19 puppet begins to apply all receipts, which just takes some time.

Creating ssh-fuse-mount /mnt/vagrant and /mnt/oddb.org to have direct access to the current project on my desktop machine. Added user niklaus. Emerged vim,sudo, sshfs-fuse. Set default editor to vi eselect editor set 3. Added niklaus to sudoers. Uncommented user_allow_other in /etc/fuse.conf

I got a few errors, as I did not yet adapt my puppet setup to the fact that I don't need to patch the dbi.gem. Changed this.

Postgresql 8.4 server does not start. Called by hand emerge --config dev-db/postgresql-server:8.4, which takes a few minutes to determine the correct size for max_connections (10) and shared_buffers (400kB). Therefore I think it might have caused a silent error when running from puppet. Restarting puppet at 16:33. Postgresql does not start because of missing conf files in /etc/postgresql-8.4/. The puppet module for postgres seems to have problems handling funtoo. Trying to copy the configuration of my virtual machine.

Calling manually emerge --config dev-db/postgresql-server:8.4 I got the following error

er Datenbankcluster wird mit der Locale de_CH.UTF-8 initialisiert werden.
Die Standardtextsuchekonfiguration wird auf »german« gesetzt.

berichtige Zugriffsrechte des bestehenden Verzeichnisses /var/lib/postgresql/8.4/data ... ok
erzeuge Unterverzeichnisse ... ok
wähle Vorgabewert für max_connections ... 
10
wähle Vorgabewert für shared_buffers ... 400kB
erzeuge Konfigurationsdateien ... ok
erzeuge Datenbank template1 in /var/lib/postgresql/8.4/data/base/1 ... FATAL:  too many private dirs demanded
Kindprozess hat mit Code 1 beendet
initdb: entferne Inhalt des Datenverzeichnisses »/var/lib/postgresql/8.4/data«
mv: der Aufruf von stat für „/var/lib/postgresql/8.4/data/*.conf“ ist nicht möglich: Datei oder Verzeichnis nicht gefunden

Found Bug https://groups.google.com/forum/#!topic/pgsql.bugs/SnqwEbhewtQ. Removed /usr/share/zoneinfo/posix which created an infinite recursion

ls -l /usr/share/zoneinfo/posix
lrwxrwxrwx 1 root root 1  3. Nov 04:21 /usr/share/zoneinfo/posix -> .

Now puppet is installing the database (Takes 6 minutes 20 seconds). Another failure because the sha25.rb uses ruby1.9 now and is at a different place. After fixing that bin/oddbd has problems coming up as it uses the unpatched dbi gem. Therefore changing the gemfile to use gem "dbi", "0.4.5", :git => 'https://github.com/zdavatz/ruby-dbi.git'. Fetching and importing the database from thinpower. This gives me the following error message FEHLER: konnte Wörterbuchdatei »/usr/share/postgresql-8.4/tsearch_data/french_fulltext.dict« nicht öffnen: Datei oder Verzeichnis nicht gefunden

And at 18:06 http://oddb-ci2.dyndns.org/ worked for the first time! Requesting the password for the root user worked and allowed me to login. Could open a link via the Fachinfo. Searching via trademark failed (Problem because of missing spelling files?). Searching via iksnr worked.

Installing app-dicts/aspell-de and aspell-fr. Removing /var/lib/postgresql/8.4/data, /etc/postgresql-8.4/*conf. Unmerge and emerge postgresql-server:8.4 again.

Now odddb-ci2 seems to work (at least partially). Some searches in the trademark work (Xeljanz, Aprokam), other not (Famvir, Alutard).

Instaed of sudo -u apache /var/www/oddb.org/bin/oddbd I must /var/www/oddb.org && sudo -u apache bundle exec bin/oddbd to start oddbd and find the correct dbi.rb from zdavatz (with the patched row/statements)

Trying to make yus work without needle

Continuing work of yesterday.

Another try at fixing installation of gems under travis-ci with the commit Fix installation of gem for tracis-ci

Now the travis-ci is successfull for ruby 1.8, 1.9, 2.0, But ruby-head reports this failure:

Using dbi (0.4.5) from https://github.com/zdavatz/ruby-dbi (at master)
RuntimeError: can't modify frozen String
An error occurred while installing dbi (0.4.5), and Bundler cannot continue.
Make sure that `gem install dbi -v '0.4.5'` succeeds before bundling.

As the bin/oddbd has errors when run, I will add some unit tests for lib/yus/server.rb where our coverage is too low. Pushed commit Improved test coverage for session and server

The unit tests did not reveal any flaw in the implementation, but I am puzzled that my simple Persistence model in test/helpers.rb does not handle correctly a rename of an entity. I am asking myself whether this has a connection with our problems renaming sequences.

Look at the implementation of lib/yus/persistence/odba.rb and found that the save_entity method is not so simple, e.g.

      def save_entity(entity)
        if(@entities[entity.name])
          entity.odba_store
        else
          @entities.delete_if { |name, ent| ent.name == entity.name }
          add_entity(entity)
        end
      end

Which explains quite nicely why my naive implementation did not work correctly. May be I must adapt this code for my problem with the sequences, too. Pushd commit Fixed MockPersistence to handle rename correctly

Pushing coverage of session.rb found a bug (Ruby 1.8.7) where pretty_inspect was not declared. Pushed commit Fix ruby 1.8.7. missing require 'pp'

I will look also at oddbapp.rb to see whether we test yus in the same way as oddbapp does use it.

view · edit · sidebar · attach · print · history
Page last modified on November 13, 2013, at 08:35 AM