Last active
August 29, 2015 14:27
-
-
Save FilBot3/fbf6d34b0a9958212c3c to your computer and use it in GitHub Desktop.
Razor Server setup issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| # This is the configuration file for the Razor server. For each | |
| # environment, the file contains a hash of configuration values. The | |
| # special environment 'all' is used to set configuration values for all | |
| # environments | |
| # | |
| # The *database_url* setting must be a connection URL for | |
| # (Sequel)[http://sequel.rubyforge.org/rdoc/files/doc/opening_databases_rdoc.html] | |
| production: | |
| database_url: 'jdbc:postgresql:razor_prd?user=razor&password=razor' | |
| development: | |
| database_url: 'jdbc:postgresql:razor_dev' | |
| test: | |
| database_url: 'jdbc:postgresql:razor?user=razor&password=razor' | |
| all: | |
| # This section configures authentication for the Razor server. | |
| # Authentication applies to access to the `/api` URL path only. | |
| auth: | |
| # You can enable or disable authentication support. When disabled, all | |
| # authentication is ignored and access to `/api` is unrestricted. | |
| # When enabled a valid username and password must be present in all | |
| # requests to `/api`. | |
| enabled: true | |
| # The path to the authentication configuration file. We use Apache Shiro | |
| # to manage authentication, since it provides a solid and effective | |
| # abstraction over common third party sources of authentication and role | |
| # management information. | |
| # | |
| # You can learn more about the content of this file in their documentation: | |
| # http://shiro.apache.org/configuration.html | |
| # | |
| # If this is an absolute path it will be used as-is, but if you give a | |
| # relative path it is relative to the root directory of the | |
| # Razor installation. | |
| config: shiro.ini | |
| microkernel: | |
| debug_level: debug | |
| kernel_args: | |
| # If this value is present, and points to a zip file, it will be | |
| # downloaded and unpacked by the MK client prior to checkin. This allows | |
| # for custom facts and other code to be shipped to the client without | |
| # having to rebuild the ISO image. | |
| # | |
| # If it is not set, no update will be sent, and the ISO will use only the | |
| # default facts, etc, available in the default build. | |
| # | |
| # extension-zip: /etc/razor/mk-extension.zip | |
| # Should communications with /api be secured? This property determines | |
| # whether to require HTTPS/SSL when making calls in the /api namespace. | |
| secure_api: false | |
| # Should newly discovered nodes be marked installed? | |
| protect_new_nodes: false | |
| # Should hook input be recorded in the event log for debugging? | |
| store_hook_input: false | |
| # Should hook output be recorded in the event log for debugging? | |
| store_hook_output: false | |
| # How to match nodes to possibly existing nodes in the database. The node | |
| # sends us the MAC addresses of its network interfaces, serial number, | |
| # asset tag, and UUID. We consider two nodes to be the same if they agree | |
| # on any of the values named in the array +match_nodes_on+. Array entries | |
| # can be any of 'mac', 'serial', 'asset', or 'uuid', in any order. | |
| # | |
| # Note that if you have nodes that have dummy values for one of these, | |
| # e.g. that all have an asset tag of 'No asset tag' and +match_nodes_on+ | |
| # contains 'asset', all these nodes will be assumed to be the | |
| # same. Better yet: make sure that +match_nodes_on+ does not contain | |
| # 'asset' in that situation | |
| # | |
| # By default, we only match on MAC's, which is generally safe, but will | |
| # cause trouble if the NIC's in a node are ever completely | |
| # replaced. Consider adding one of the other possible values, e.g. 'uuid' | |
| # to the array | |
| match_nodes_on: | |
| - mac | |
| checkin_interval: 15 | |
| # Colon-separated list of paths; each entry must be a directory in which | |
| # we should look for tasks | |
| task_path: tasks | |
| repo_store_root: /var/lib/razor/repo-store | |
| # The *broker_path* is a colon separated list of directories containing | |
| # broker types | |
| broker_path: brokers | |
| # The *hook_path* is a colon separated list of directories containing | |
| # hook types | |
| hook_path: hooks | |
| facts: | |
| # Facts that we should always ignore. These are stripped out before we | |
| # do anything else with facts coming in from a node. Each entry in this | |
| # array can either be a string (literal name of a fact) or a regexp | |
| # enclosed in /../ where any fact that matches the regexp will be | |
| # dropped | |
| blacklist: | |
| - domain | |
| - filesystems | |
| - fqdn | |
| - hostname | |
| - id | |
| - /kernel.*/ | |
| - memoryfree | |
| - memorysize | |
| - memorytotal | |
| - /operatingsystem.*/ | |
| - osfamily | |
| - path | |
| - ps | |
| - rubysitedir | |
| - rubyversion | |
| - selinux | |
| - sshdsakey | |
| - /sshfp_[dr]sa/ | |
| - sshrsakey | |
| - /swap.*/ | |
| - timezone | |
| - /uptime.*/ | |
| # Facts that should be used to match nodes on; these are useful if the | |
| # primary hardware information like MAC addresses has changed (e.g., | |
| # because of a motherboard replacement), but you want to make sure that | |
| # an existing node is still identified as the 'old' node. These facts | |
| # must be unique across all nodes that Razor manages - otherwise, it | |
| # will erroneously identify two physically different nodes as the same. | |
| # | |
| # The entries in the array follow the same format as those for | |
| # facts.blacklist | |
| #match_on: | |
| # - unique_fact | |
| # - /other_facts_.*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # PostgreSQL Client Authentication Configuration File | |
| # =================================================== | |
| # | |
| # Refer to the "Client Authentication" section in the | |
| # PostgreSQL documentation for a complete description | |
| # of this file. A short synopsis follows. | |
| # | |
| # This file controls: which hosts are allowed to connect, how clients | |
| # are authenticated, which PostgreSQL user names they can use, which | |
| # databases they can access. Records take one of these forms: | |
| # | |
| # local DATABASE USER METHOD [OPTIONS] | |
| # host DATABASE USER CIDR-ADDRESS METHOD [OPTIONS] | |
| # hostssl DATABASE USER CIDR-ADDRESS METHOD [OPTIONS] | |
| # hostnossl DATABASE USER CIDR-ADDRESS METHOD [OPTIONS] | |
| # | |
| # (The uppercase items must be replaced by actual values.) | |
| # | |
| # The first field is the connection type: "local" is a Unix-domain socket, | |
| # "host" is either a plain or SSL-encrypted TCP/IP socket, "hostssl" is an | |
| # SSL-encrypted TCP/IP socket, and "hostnossl" is a plain TCP/IP socket. | |
| # | |
| # DATABASE can be "all", "sameuser", "samerole", a database name, or | |
| # a comma-separated list thereof. | |
| # | |
| # USER can be "all", a user name, a group name prefixed with "+", or | |
| # a comma-separated list thereof. In both the DATABASE and USER fields | |
| # you can also write a file name prefixed with "@" to include names from | |
| # a separate file. | |
| # | |
| # CIDR-ADDRESS specifies the set of hosts the record matches. | |
| # It is made up of an IP address and a CIDR mask that is an integer | |
| # (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that specifies | |
| # the number of significant bits in the mask. Alternatively, you can write | |
| # an IP address and netmask in separate columns to specify the set of hosts. | |
| # | |
| # METHOD can be "trust", "reject", "md5", "password", "gss", "sspi", "krb5", | |
| # "ident", "pam", "ldap" or "cert". Note that "password" sends passwords | |
| # in clear text; "md5" is preferred since it sends encrypted passwords. | |
| # | |
| # OPTIONS are a set of options for the authentication in the format | |
| # NAME=VALUE. The available options depend on the different authentication | |
| # methods - refer to the "Client Authentication" section in the documentation | |
| # for a list of which options are available for which authentication methods. | |
| # | |
| # Database and user names containing spaces, commas, quotes and other special | |
| # characters must be quoted. Quoting one of the keywords "all", "sameuser" or | |
| # "samerole" makes the name lose its special character, and just match a | |
| # database or username with that name. | |
| # | |
| # This file is read on server startup and when the postmaster receives | |
| # a SIGHUP signal. If you edit the file on a running system, you have | |
| # to SIGHUP the postmaster for the changes to take effect. You can use | |
| # "pg_ctl reload" to do that. | |
| # Put your actual configuration here | |
| # ---------------------------------- | |
| # | |
| # If you want to allow non-local connections, you need to add more | |
| # "host" records. In that case you will also need to make PostgreSQL listen | |
| # on a non-local interface via the listen_addresses configuration parameter, | |
| # or via the -i or -h command line switches. | |
| # | |
| # TYPE DATABASE USER ADDRESS METHOD | |
| local all all trust | |
| host all all 127.0.0.1/32 trust | |
| # TYPE DATABASE USER CIDR-ADDRESS METHOD | |
| # "local" is for Unix domain socket connections only | |
| local all all ident | |
| # IPv4 local connections: | |
| host all all 127.0.0.1/32 ident | |
| # IPv6 local connections: | |
| host all all ::1/128 ident |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [vagrant@centos6 ~]$ sudo su - razor -c "razor-admin --environment production migrate-database" | |
| I, [2015-08-19T16:17:57.816000 #2045] INFO -- razor.sequel: (0.005000s) SET standard_conforming_strings = ON | |
| I, [2015-08-19T16:17:57.824000 #2045] INFO -- razor.sequel: (0.001000s) SET client_min_messages = 'WARNING' | |
| I, [2015-08-19T16:17:57.864000 #2045] INFO -- razor.sequel: (0.038000s) SELECT version() | |
| E, [2015-08-19T16:17:57.908000 #2045] ERROR -- razor.sequel: Java::OrgPostgresqlUtil::PSQLException: ERROR: relation "schema_info" does not exist | |
| Position: 27: SELECT NULL AS "nil" FROM "schema_info" LIMIT 1 | |
| I, [2015-08-19T16:17:57.935000 #2045] INFO -- razor.sequel: (0.019000s) CREATE TABLE "schema_info" ("version" integer DEFAULT 0 NOT NULL) | |
| I, [2015-08-19T16:17:57.944000 #2045] INFO -- razor.sequel: (0.005000s) SELECT * FROM "schema_info" LIMIT 1 | |
| I, [2015-08-19T16:17:57.952000 #2045] INFO -- razor.sequel: (0.000000s) SELECT 1 AS "one" FROM "schema_info" LIMIT 1 | |
| I, [2015-08-19T16:17:57.968000 #2045] INFO -- razor.sequel: (0.011000s) SELECT pg_attribute.attname AS pk FROM pg_class, pg_attribute, pg_index, pg_namespace WHERE pg_class.oid = pg_attribute.attrelid AND pg_class.relnamespace = pg_namespace.oid AND pg_class.oid = pg_index.indrelid AND pg_index.indkey[0] = pg_attribute.attnum AND pg_index.indisprimary = 't' AND pg_class.oid = CAST(CAST('"schema_info"' AS regclass) AS oid) | |
| I, [2015-08-19T16:17:57.979000 #2045] INFO -- razor.sequel: (0.001000s) INSERT INTO "schema_info" ("version") VALUES (0) RETURNING NULL | |
| I, [2015-08-19T16:17:57.991000 #2045] INFO -- razor.sequel: (0.003000s) SELECT count(*) AS "count" FROM "schema_info" LIMIT 1 | |
| I, [2015-08-19T16:17:58.006000 #2045] INFO -- razor.sequel: (0.004000s) SELECT "version" FROM "schema_info" LIMIT 1 | |
| I, [2015-08-19T16:17:58.111000 #2045] INFO -- razor.sequel: Begin applying migration version 1, direction: up | |
| I, [2015-08-19T16:17:58.116000 #2045] INFO -- razor.sequel: (0.000000s) BEGIN | |
| I, [2015-08-19T16:17:58.154000 #2045] INFO -- razor.sequel: (0.006000s) CREATE TABLE "sequel_constraint_validations" ("table" text NOT NULL, "constraint_name" text, "validation_type" text NOT NULL, "column" text NOT NULL, "argument" text, "message" text, "allow_nil" boolean) | |
| I, [2015-08-19T16:17:58.195000 #2045] INFO -- razor.sequel: (0.001000s) UPDATE "schema_info" SET "version" = 1 | |
| I, [2015-08-19T16:17:58.198000 #2045] INFO -- razor.sequel: (0.001000s) COMMIT | |
| I, [2015-08-19T16:17:58.205000 #2045] INFO -- razor.sequel: Finished applying migration version 1, direction: up, took 0.094000 seconds | |
| I, [2015-08-19T16:17:58.206000 #2045] INFO -- razor.sequel: Begin applying migration version 2, direction: up | |
| I, [2015-08-19T16:17:58.214000 #2045] INFO -- razor.sequel: (0.003000s) BEGIN | |
| I, [2015-08-19T16:17:58.267000 #2045] INFO -- razor.sequel: (0.005000s) INSERT INTO "sequel_constraint_validations" ("table", "constraint_name", "validation_type", "column", "argument", "message", "allow_nil") VALUES ('repos', 'repo_name_is_simple', 'iformat', 'name', '\A[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000](?:[^\u0000-\u001f/]*[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])?\Z(?!\n)', NULL, NULL), ('repos', 'iso_url_is_simple', 'iformat', 'iso_url', '\A(?:https?://[^/]+/?|file:(?://)?/)(?:[^/][^\u0000-\u0020]*)?\Z(?!\n)', NULL, NULL) | |
| I, [2015-08-19T16:17:58.304000 #2045] INFO -- razor.sequel: (0.020000s) CREATE TABLE "repos" ("id" serial PRIMARY KEY, "name" varchar(250) NOT NULL, "iso_url" varchar(1000) NOT NULL, "tmpdir" varchar(4096) NULL, CONSTRAINT "repo_name_is_simple" CHECK (("name" IS NOT NULL) AND ("name" ~* '\A[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000](?:[^\u0000-\u001f/]*[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])?\Z(?!\n)')), CONSTRAINT "iso_url_is_simple" CHECK (("iso_url" IS NOT NULL) AND ("iso_url" ~* '\A(?:https?://[^/]+/?|file:(?://)?/)(?:[^/][^\u0000-\u0020]*)?\Z(?!\n)'))) | |
| I, [2015-08-19T16:17:58.315000 #2045] INFO -- razor.sequel: (0.006000s) CREATE UNIQUE INDEX "repos_name_index" ON "repos" (lower("name")) | |
| I, [2015-08-19T16:17:58.346000 #2045] INFO -- razor.sequel: (0.003000s) INSERT INTO "sequel_constraint_validations" ("table", "constraint_name", "validation_type", "column", "argument", "message", "allow_nil") VALUES ('installers', 'installer_name_is_simple', 'iformat', 'name', '\A[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000](?:[^\u0000-\u001f/]*[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])?\Z(?!\n)', NULL, NULL) | |
| I, [2015-08-19T16:17:58.392000 #2045] INFO -- razor.sequel: (0.023000s) CREATE TABLE "installers" ("id" serial PRIMARY KEY, "name" varchar(250) NOT NULL UNIQUE, "os" varchar(1000) NOT NULL, "os_version" varchar(1000), "description" varchar(1000), "base" varchar(255) REFERENCES "installers"("name"), "boot_seq" text DEFAULT '{}' NOT NULL, "templates" text DEFAULT '{}', CONSTRAINT "installer_name_is_simple" CHECK (("name" IS NOT NULL) AND ("name" ~* '\A[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000](?:[^\u0000-\u001f/]*[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])?\Z(?!\n)'))) | |
| I, [2015-08-19T16:17:58.402000 #2045] INFO -- razor.sequel: (0.008000s) CREATE UNIQUE INDEX "installers_name_index" ON "installers" (lower("name")) | |
| I, [2015-08-19T16:17:58.452000 #2045] INFO -- razor.sequel: (0.003000s) INSERT INTO "sequel_constraint_validations" ("table", "constraint_name", "validation_type", "column", "argument", "message", "allow_nil") VALUES ('brokers', 'broker_name_is_simple', 'iformat', 'name', '\A[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000](?:[^\u0000-\u001f/]*[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])?\Z(?!\n)', NULL, NULL), ('brokers', 'broker_type_is_simple', 'iformat', 'broker_type', '\A[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000](?:[^\u0000-\u001f/]*[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])?\Z(?!\n)', NULL, NULL) | |
| I, [2015-08-19T16:17:58.472000 #2045] INFO -- razor.sequel: (0.010000s) CREATE TABLE "brokers" ("id" serial PRIMARY KEY, "name" varchar(250) NOT NULL, "configuration" text DEFAULT '{}' NOT NULL, "broker_type" varchar(250) NOT NULL, CONSTRAINT "broker_name_is_simple" CHECK (("name" IS NOT NULL) AND ("name" ~* '\A[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000](?:[^\u0000-\u001f/]*[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])?\Z(?!\n)')), CONSTRAINT "broker_type_is_simple" CHECK (("broker_type" IS NOT NULL) AND ("broker_type" ~* '\A[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000](?:[^\u0000-\u001f/]*[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])?\Z(?!\n)'))) | |
| I, [2015-08-19T16:17:58.477000 #2045] INFO -- razor.sequel: (0.003000s) CREATE UNIQUE INDEX "brokers_name_index" ON "brokers" (lower("name")) | |
| I, [2015-08-19T16:17:58.507000 #2045] INFO -- razor.sequel: (0.015000s) CREATE TABLE "policies" ("id" serial PRIMARY KEY, "name" text NOT NULL UNIQUE, "repo_id" integer NOT NULL REFERENCES "repos", "installer_name" text NOT NULL, "hostname_pattern" text NOT NULL, "root_password" text NOT NULL, "enabled" boolean, "max_count" integer, "rule_number" integer NOT NULL UNIQUE, "broker_id" integer NOT NULL REFERENCES "brokers") | |
| I, [2015-08-19T16:17:58.517000 #2045] INFO -- razor.sequel: (0.008000s) CREATE TABLE "tags" ("id" serial PRIMARY KEY, "name" text NOT NULL UNIQUE, "matcher" text NOT NULL) | |
| I, [2015-08-19T16:17:58.554000 #2045] INFO -- razor.sequel: (0.012000s) CREATE TABLE "nodes" ("id" serial PRIMARY KEY, "hw_info" Text[] NOT NULL, "dhcp_mac" text, "policy_id" integer REFERENCES "policies", "facts" text, "hostname" text, "root_password" text, "ip_address" text, "boot_count" integer DEFAULT 0, "last_checkin" timestamp with time zone, CONSTRAINT "nodes_policy_sets_hostname" CHECK (policy_id is NULL or hostname is not NULL), CONSTRAINT "nodes_policy_sets_root_password" CHECK (policy_id is NULL or root_password is not NULL)) | |
| I, [2015-08-19T16:17:58.558000 #2045] INFO -- razor.sequel: (0.003000s) CREATE UNIQUE INDEX "nodes_dhcp_mac_index" ON "nodes" (lower("dhcp_mac")) | |
| I, [2015-08-19T16:17:58.596000 #2045] INFO -- razor.sequel: (0.003000s) CREATE TABLE "node_log_entries" ("node_id" integer NOT NULL REFERENCES "nodes" ON DELETE CASCADE, "timestamp" timestamp with time zone DEFAULT now(), "entry" text NOT NULL) | |
| I, [2015-08-19T16:17:58.621000 #2045] INFO -- razor.sequel: (0.008000s) CREATE TABLE "nodes_tags" ("node_id" integer NOT NULL REFERENCES "nodes" ON DELETE CASCADE, "tag_id" integer NOT NULL REFERENCES "tags" ON DELETE CASCADE, PRIMARY KEY ("node_id", "tag_id")) | |
| I, [2015-08-19T16:17:58.631000 #2045] INFO -- razor.sequel: (0.003000s) CREATE INDEX "nodes_tags_node_id_tag_id_index" ON "nodes_tags" ("node_id", "tag_id") | |
| I, [2015-08-19T16:17:58.657000 #2045] INFO -- razor.sequel: (0.007000s) CREATE TABLE "policies_tags" ("policy_id" integer NOT NULL REFERENCES "policies", "tag_id" integer NOT NULL REFERENCES "tags", PRIMARY KEY ("policy_id", "tag_id")) | |
| I, [2015-08-19T16:17:58.665000 #2045] INFO -- razor.sequel: (0.002000s) CREATE INDEX "policies_tags_tag_id_policy_id_index" ON "policies_tags" ("tag_id", "policy_id") | |
| I, [2015-08-19T16:17:58.674000 #2045] INFO -- razor.sequel: (0.005000s) UPDATE "schema_info" SET "version" = 2 | |
| I, [2015-08-19T16:17:58.679000 #2045] INFO -- razor.sequel: (0.004000s) COMMIT | |
| I, [2015-08-19T16:17:58.687000 #2045] INFO -- razor.sequel: Finished applying migration version 2, direction: up, took 0.481000 seconds | |
| I, [2015-08-19T16:17:58.688000 #2045] INFO -- razor.sequel: Begin applying migration version 3, direction: up | |
| I, [2015-08-19T16:17:58.698000 #2045] INFO -- razor.sequel: (0.008000s) BEGIN | |
| I, [2015-08-19T16:17:58.721000 #2045] INFO -- razor.sequel: (0.004000s) ALTER TABLE "repos" ADD COLUMN "url" varchar(1000), ALTER COLUMN "iso_url" DROP NOT NULL, ADD CONSTRAINT "repos_url_xor_iso_url_not_null" CHECK ((iso_url is null and url is not null) | |
| or (iso_url is not null and url is null)) | |
| I, [2015-08-19T16:17:58.744000 #2045] INFO -- razor.sequel: (0.003000s) DELETE FROM "sequel_constraint_validations" WHERE (("table", "constraint_name") IN (('repos', 'iso_url_is_simple'))) | |
| I, [2015-08-19T16:17:58.757000 #2045] INFO -- razor.sequel: (0.006000s) INSERT INTO "sequel_constraint_validations" ("table", "constraint_name", "validation_type", "column", "argument", "message", "allow_nil") VALUES ('repos', 'url_is_simple', 'iformat', 'url', '\A(?:https?://[^/]+/?|file:(?://)?/)(?:[^/][^\u0000-\u0020]*)?\Z(?!\n)', NULL, true) | |
| I, [2015-08-19T16:17:58.769000 #2045] INFO -- razor.sequel: (0.003000s) ALTER TABLE "repos" ADD CONSTRAINT "url_is_simple" CHECK (("url" IS NULL) OR ("url" ~* '\A(?:https?://[^/]+/?|file:(?://)?/)(?:[^/][^\u0000-\u0020]*)?\Z(?!\n)')), DROP CONSTRAINT "iso_url_is_simple" | |
| I, [2015-08-19T16:17:58.797000 #2045] INFO -- razor.sequel: (0.003000s) INSERT INTO "sequel_constraint_validations" ("table", "constraint_name", "validation_type", "column", "argument", "message", "allow_nil") VALUES ('repos', 'iso_url_is_simple', 'iformat', 'iso_url', '\A(?:https?://[^/]+/?|file:(?://)?/)(?:[^/][^\u0000-\u0020]*)?\Z(?!\n)', NULL, true) | |
| I, [2015-08-19T16:17:58.807000 #2045] INFO -- razor.sequel: (0.004000s) ALTER TABLE "repos" ADD CONSTRAINT "iso_url_is_simple" CHECK (("iso_url" IS NULL) OR ("iso_url" ~* '\A(?:https?://[^/]+/?|file:(?://)?/)(?:[^/][^\u0000-\u0020]*)?\Z(?!\n)')) | |
| I, [2015-08-19T16:17:58.824000 #2045] INFO -- razor.sequel: (0.004000s) UPDATE "schema_info" SET "version" = 3 | |
| I, [2015-08-19T16:17:58.838000 #2045] INFO -- razor.sequel: (0.004000s) COMMIT | |
| I, [2015-08-19T16:17:59.012000 #2045] INFO -- razor.sequel: Finished applying migration version 3, direction: up, took 0.324000 seconds | |
| I, [2015-08-19T16:17:59.018000 #2045] INFO -- razor.sequel: Begin applying migration version 4, direction: up | |
| I, [2015-08-19T16:17:59.022000 #2045] INFO -- razor.sequel: (0.003000s) BEGIN | |
| I, [2015-08-19T16:17:59.033000 #2045] INFO -- razor.sequel: (0.001000s) ALTER TABLE "installers" ADD COLUMN "architecture" varchar(16) | |
| I, [2015-08-19T16:17:59.047000 #2045] INFO -- razor.sequel: (0.004000s) UPDATE "schema_info" SET "version" = 4 | |
| I, [2015-08-19T16:17:59.055000 #2045] INFO -- razor.sequel: (0.006000s) COMMIT | |
| I, [2015-08-19T16:17:59.056000 #2045] INFO -- razor.sequel: Finished applying migration version 4, direction: up, took 0.040000 seconds | |
| I, [2015-08-19T16:17:59.057000 #2045] INFO -- razor.sequel: Begin applying migration version 5, direction: up | |
| I, [2015-08-19T16:17:59.064000 #2045] INFO -- razor.sequel: (0.001000s) BEGIN | |
| I, [2015-08-19T16:17:59.084000 #2045] INFO -- razor.sequel: (0.001000s) ALTER TABLE "nodes" ADD COLUMN "ipmi_hostname" varchar(255) NULL, ADD COLUMN "ipmi_username" varchar(32) NULL, ADD COLUMN "ipmi_password" varchar(20) NULL, ADD CONSTRAINT "ipmi_require_hostname_if_user_or_pass" CHECK ((ipmi_hostname IS NULL AND ipmi_username IS NULL AND ipmi_password IS NULL) OR | |
| (ipmi_hostname IS NOT NULL) | |
| ), ADD COLUMN "last_known_power_state" boolean NULL, ADD COLUMN "last_power_state_update_at" timestamp with time zone NULL | |
| I, [2015-08-19T16:17:59.105000 #2045] INFO -- razor.sequel: (0.000000s) INSERT INTO "sequel_constraint_validations" ("table", "constraint_name", "validation_type", "column", "argument", "message", "allow_nil") VALUES ('nodes', 'ipmi_hostname_is_simple', 'iformat', 'ipmi_hostname', '\A[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000](?:[^\u0000-\u001f/]*[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])?\Z(?!\n)', NULL, true), ('nodes', 'ipmi_username_is_simple', 'iformat', 'ipmi_username', '\A[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000](?:[^\u0000-\u001f/]*[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])?\Z(?!\n)', NULL, true), ('nodes', 'ipmi_password_is_simple', 'iformat', 'ipmi_password', '\A[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000](?:[^\u0000-\u001f/]*[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])?\Z(?!\n)', NULL, true) | |
| I, [2015-08-19T16:17:59.116000 #2045] INFO -- razor.sequel: (0.007000s) ALTER TABLE "nodes" ADD CONSTRAINT "ipmi_hostname_is_simple" CHECK (("ipmi_hostname" IS NULL) OR ("ipmi_hostname" ~* '\A[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000](?:[^\u0000-\u001f/]*[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])?\Z(?!\n)')), ADD CONSTRAINT "ipmi_username_is_simple" CHECK (("ipmi_username" IS NULL) OR ("ipmi_username" ~* '\A[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000](?:[^\u0000-\u001f/]*[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])?\Z(?!\n)')), ADD CONSTRAINT "ipmi_password_is_simple" CHECK (("ipmi_password" IS NULL) OR ("ipmi_password" ~* '\A[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000](?:[^\u0000-\u001f/]*[^\u0000-\u0020/\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])?\Z(?!\n)')) | |
| I, [2015-08-19T16:17:59.122000 #2045] INFO -- razor.sequel: (0.004000s) UPDATE "schema_info" SET "version" = 5 | |
| I, [2015-08-19T16:17:59.127000 #2045] INFO -- razor.sequel: (0.003000s) COMMIT | |
| I, [2015-08-19T16:17:59.127000 #2045] INFO -- razor.sequel: Finished applying migration version 5, direction: up, took 0.070000 seconds | |
| I, [2015-08-19T16:17:59.128000 #2045] INFO -- razor.sequel: Begin applying migration version 6, direction: up | |
| I, [2015-08-19T16:17:59.134000 #2045] INFO -- razor.sequel: (0.002000s) BEGIN | |
| I, [2015-08-19T16:17:59.151000 #2045] INFO -- razor.sequel: (0.008000s) ALTER TABLE "nodes" ADD COLUMN "metadata" text DEFAULT '{}' NOT NULL | |
| I, [2015-08-19T16:17:59.158000 #2045] INFO -- razor.sequel: (0.004000s) UPDATE "schema_info" SET "version" = 6 | |
| I, [2015-08-19T16:17:59.162000 #2045] INFO -- razor.sequel: (0.003000s) COMMIT | |
| I, [2015-08-19T16:17:59.167000 #2045] INFO -- razor.sequel: Finished applying migration version 6, direction: up, took 0.039000 seconds | |
| I, [2015-08-19T16:17:59.168000 #2045] INFO -- razor.sequel: Begin applying migration version 7, direction: up | |
| I, [2015-08-19T16:17:59.169000 #2045] INFO -- razor.sequel: (0.001000s) BEGIN | |
| I, [2015-08-19T16:17:59.177000 #2045] INFO -- razor.sequel: (0.001000s) SELECT * FROM "nodes" | |
| I, [2015-08-19T16:17:59.195000 #2045] INFO -- razor.sequel: (0.001000s) ALTER TABLE "nodes" DROP COLUMN "ip_address" | |
| I, [2015-08-19T16:17:59.202000 #2045] INFO -- razor.sequel: (0.003000s) UPDATE "schema_info" SET "version" = 7 | |
| I, [2015-08-19T16:17:59.208000 #2045] INFO -- razor.sequel: (0.002000s) COMMIT | |
| I, [2015-08-19T16:17:59.208000 #2045] INFO -- razor.sequel: Finished applying migration version 7, direction: up, took 0.040000 seconds | |
| I, [2015-08-19T16:17:59.216000 #2045] INFO -- razor.sequel: Begin applying migration version 8, direction: up | |
| I, [2015-08-19T16:17:59.226000 #2045] INFO -- razor.sequel: (0.003000s) BEGIN | |
| I, [2015-08-19T16:17:59.238000 #2045] INFO -- razor.sequel: (0.001000s) ALTER TABLE "nodes" ADD COLUMN "installed" varchar(250), ADD COLUMN "installed_at" timestamp with time zone, ADD CONSTRAINT "nodes_installed_fields_set_together" CHECK ((installed is null and installed_at is null) | |
| or (installed is not null and installed_at is not null)) | |
| I, [2015-08-19T16:17:59.250000 #2045] INFO -- razor.sequel: (0.001000s) UPDATE "nodes" SET "installed" = (SELECT "name" FROM "policies" WHERE ("id" = "policy_id")), "installed_at" = now() WHERE ("policy_id" IS NOT NULL) | |
| I, [2015-08-19T16:17:59.258000 #2045] INFO -- razor.sequel: (0.004000s) UPDATE "schema_info" SET "version" = 8 | |
| I, [2015-08-19T16:17:59.260000 #2045] INFO -- razor.sequel: (0.001000s) COMMIT | |
| I, [2015-08-19T16:17:59.261000 #2045] INFO -- razor.sequel: Finished applying migration version 8, direction: up, took 0.045000 seconds | |
| I, [2015-08-19T16:17:59.262000 #2045] INFO -- razor.sequel: Begin applying migration version 9, direction: up | |
| I, [2015-08-19T16:17:59.264000 #2045] INFO -- razor.sequel: (0.000000s) BEGIN | |
| I, [2015-08-19T16:17:59.274000 #2045] INFO -- razor.sequel: (0.001000s) ALTER TABLE "installers" RENAME TO "recipes" | |
| I, [2015-08-19T16:17:59.276000 #2045] INFO -- razor.sequel: (0.000000s) ALTER INDEX installers_name_index RENAME TO recipes_name_index | |
| I, [2015-08-19T16:17:59.278000 #2045] INFO -- razor.sequel: (0.001000s) ALTER INDEX installers_name_key RENAME TO recipes_name_key | |
| I, [2015-08-19T16:17:59.281000 #2045] INFO -- razor.sequel: (0.000000s) ALTER INDEX installers_pkey RENAME TO recipes_pkey | |
| I, [2015-08-19T16:17:59.283000 #2045] INFO -- razor.sequel: (0.001000s) ALTER SEQUENCE installers_id_seq RENAME TO recipes_id_seq | |
| I, [2015-08-19T16:17:59.294000 #2045] INFO -- razor.sequel: (0.000000s) UPDATE "sequel_constraint_validations" SET "table" = 'recipes' WHERE ("table" = 'installers') | |
| I, [2015-08-19T16:17:59.298000 #2045] INFO -- razor.sequel: (0.001000s) ALTER TABLE "policies" RENAME COLUMN "installer_name" TO "recipe_name" | |
| I, [2015-08-19T16:17:59.300000 #2045] INFO -- razor.sequel: (0.001000s) UPDATE "schema_info" SET "version" = 9 | |
| I, [2015-08-19T16:17:59.303000 #2045] INFO -- razor.sequel: (0.001000s) COMMIT | |
| I, [2015-08-19T16:17:59.304000 #2045] INFO -- razor.sequel: Finished applying migration version 9, direction: up, took 0.041000 seconds | |
| I, [2015-08-19T16:17:59.304000 #2045] INFO -- razor.sequel: Begin applying migration version 10, direction: up | |
| I, [2015-08-19T16:17:59.308000 #2045] INFO -- razor.sequel: (0.001000s) BEGIN | |
| E, [2015-08-19T16:17:59.317000 #2045] ERROR -- razor.sequel: Java::OrgPostgresqlUtil::PSQLException: ERROR: syntax error at or near "DEFERRABLE" | |
| Position: 95: ALTER TABLE "policies" DROP CONSTRAINT "policies_rule_number_key", ADD UNIQUE ("rule_number") DEFERRABLE INITIALLY DEFERRED | |
| I, [2015-08-19T16:17:59.321000 #2045] INFO -- razor.sequel: (0.000000s) ROLLBACK | |
| Sequel::DatabaseError: Java::OrgPostgresqlUtil::PSQLException: ERROR: syntax error at or near "DEFERRABLE" | |
| Position: 95 | |
| raise_error at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/database/misc.rb:402 | |
| statement at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/adapters/jdbc.rb:650 | |
| statement at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/adapters/jdbc.rb:648 | |
| execute at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/adapters/jdbc.rb:278 | |
| hold at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/connection_pool/threaded.rb:91 | |
| synchronize at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/database/connecting.rb:234 | |
| execute at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/adapters/jdbc.rb:277 | |
| execute_ddl at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/adapters/jdbc.rb:300 | |
| apply_alter_table at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/database/schema_methods.rb:394 | |
| each at org/jruby/RubyArray.java:1613 | |
| apply_alter_table at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/database/schema_methods.rb:394 | |
| apply_alter_table_generator at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/database/schema_methods.rb:399 | |
| apply_alter_table_generator at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/extensions/constraint_validations.rb:283 | |
| alter_table at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/database/schema_methods.rb:79 | |
| (root) at /opt/razor/db/migrate/010_policies_rule_number_unique_deferrable.rb:11 | |
| instance_eval at org/jruby/RubyBasicObject.java:1533 | |
| apply at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/extensions/migration.rb:99 | |
| run at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/extensions/migration.rb:528 | |
| _transaction at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/database/transactions.rb:118 | |
| transaction at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/database/transactions.rb:93 | |
| hold at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/connection_pool/threaded.rb:104 | |
| hold at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/connection_pool/threaded.rb:93 | |
| synchronize at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/database/connecting.rb:234 | |
| transaction at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/database/transactions.rb:86 | |
| checked_transaction at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/extensions/migration.rb:463 | |
| run at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/extensions/migration.rb:527 | |
| each at org/jruby/RubyArray.java:1613 | |
| run at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/extensions/migration.rb:523 | |
| run at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/extensions/migration.rb:390 | |
| apply at /opt/razor/vendor/bundle/jruby/1.9/gems/sequel-4.9.0/lib/sequel/extensions/migration.rb:361 | |
| (root) at /opt/razor/bin/razor-admin:41 | |
| call at org/jruby/RubyProc.java:271 | |
| (root) at /opt/razor/bin/razor-admin:84 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Question is also posted here: http://stackoverflow.com/q/32104328/2009612