[Bug 238672] New: api doesn't accept arch other than i586/x86_64
https://bugzilla.novell.com/show_bug.cgi?id=238672 Summary: api doesn't accept arch other than i586/x86_64 Product: openSUSE.org Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: BuildService AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: poeml@novell.com QAContact: adrian@novell.com trying to create this project: <project name="openSUSE:10.2"> <repository status='disabled' name='standard'> <arch>ppc</arch> </repository> <title>the openSUSE 10.2 distribution</title> <description></description> </project> the api errors out as following. Using 'i586' instead works. Strange error message. [D|# 7942] add validation mapping: "source", :packagelist => :directory [D|# 7942] add validation mapping: "source", :filelist => :directory [D|# 7942] add validation mapping: "source", :index => :directory [D|# 7942] add validation mapping: "source", :project_meta => :project [D|# 7942] add validation mapping: "source", :package_meta => :package [I|# 7942] Processing SourceController#project_meta (for ::ffff:127.0.42.2 at 2007-01-25 12:50:10) [GET] [I|# 7942] Session ID: d120f05ff441348972d93d2a0261e013 [I|# 7942] Parameters: {"project"=>"test", "action"=>"project_meta", "controller"=>"source"} [D|# 7942] AUTH: [D|# 7942] no authentication string was sent [I|# 7942] Rendering status [I|# 7942] errorcode 'unknown' - Authentication required [I|# 7942] Rendering status (401) [I|# 7942] Filter chain halted as [extract_user] returned false [I|# 7942] Completed in 0.01779 (56 reqs/sec) | Rendering: 0.00598 (33%) | DB: 0.00000 (0%) | 401 [http://127.0.42.2/source/test/_meta] [D|# 7941] add validation mapping: "source", :packagelist => :directory [D|# 7941] add validation mapping: "source", :filelist => :directory [D|# 7941] add validation mapping: "source", :index => :directory [D|# 7941] add validation mapping: "source", :project_meta => :project [D|# 7941] add validation mapping: "source", :package_meta => :package [I|# 7941] Processing SourceController#project_meta (for ::ffff:127.0.42.2 at 2007-01-25 12:50:12) [GET] [I|# 7941] Session ID: 57234097f064f999094d7b12fbc24f4f [I|# 7941] Parameters: {"project"=>"test", "action"=>"project_meta", "controller"=>"source"} [D|# 7941] AUTH: BasicQWRtaW46b3BlbnN1c2U= [D|# 7941] User Load (0.002740) SELECT * FROM users WHERE (login = 'Admin') LIMIT 1 [D|# 7941] User Columns (0.008541) SHOW FIELDS FROM users [D|# 7941] USER found: Admin [D|# 7941] User Admin initialised [D|# 7941] User's source backend <:>, rpm backend: <:> [D|# 7941] ### project_name: "test" [D|# 7941] Project.find( "test" ) [D|# 7941] prepared find args: ["test", {:name=>"test"}] [D|# 7941] [BSSQL] find( Project, ["test", {:name=>"test"}] ) [D|# 7941] retrieving target_uri for model ':project' [D|# 7941] retrieving option hash for model ':project' [D|# 7941] [BSSQL] query_from_options: {:name=>"test"} [D|# 7941] [BSSQL] query_from_options: query is: '@name='test'' [D|# 7941] DbProject Columns (0.005302) SHOW FIELDS FROM db_projects [D|# 7941] [BSSQL] find conditions: ["db_projects.name LIKE BINARY ?", "test"] [D|# 7941] DbProject Load (0.002024) SELECT db_projects.* FROM db_projects WHERE (db_projects.name LIKE BINARY 'test') [F|# 7941] ActiveXML::Transport::NotFoundError (not found): /srv/www/obs/common/lib/activexml/transport.rb:213:in `find' /srv/www/obs/common/lib/activexml/base.rb:69:in `find' /app/controllers/source_controller.rb:211:in `project_meta' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in `perform_action_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in `perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in `process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in `process' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:150:in `process_request' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:54:in `process!' /usr/lib/ruby/vendor_ruby/1.8/fcgi.rb:612:in `each_cgi' /usr/lib/ruby/vendor_ruby/1.8/fcgi.rb:609:in `each' /usr/lib/ruby/vendor_ruby/1.8/fcgi.rb:609:in `each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:53:in `process!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:23:in `process!' /srv/www/obs/frontend/public/dispatch.fcgi:24 [I|# 7941] Rendering status [I|# 7941] errorcode 'unknown' - not found [I|# 7941] Rendering status (404) [D|# 7942] add validation mapping: "source", :packagelist => :directory [D|# 7942] add validation mapping: "source", :filelist => :directory [D|# 7942] add validation mapping: "source", :index => :directory [D|# 7942] add validation mapping: "source", :project_meta => :project [D|# 7942] add validation mapping: "source", :package_meta => :package [I|# 7942] Processing SourceController#project_meta (for ::ffff:127.0.42.2 at 2007-01-25 12:50:23) [PUT] [I|# 7942] Session ID: 45bea062c51504de67a96bd4a348d33e [I|# 7942] Parameters: {"project"=>"test", "action"=>"project_meta", "controller"=>"source"} [D|# 7942] checking schema map for controller 'source', action 'project_meta' [D|# 7942] schema_file: project [D|# 7942] schema_path: /srv/www/docs/api/frontend/project.xsd [D|# 7942] trying to validate against schema '/srv/www/docs/api/frontend/project.xsd' [D|# 7942] validation tmpfile: /srv/www/obs/frontend/tmp/opensuse_frontend_validator.7942.0 [D|# 7942] xmllint return value: 3 [D|# 7942] XML: <project name="openSUSE:10.2"> <repository status='disabled' name='standard'> <arch>ppc</arch> </repository> <title>the openSUSE 10.2 distribution</title> <description></description> </project> Suse::ValidationError (validation failed, output: /srv/www/obs/frontend/tmp/opensuse_frontend_validator.7942.0:2: element repository: Schemas validity error : Element 'repository': This element is not expected. Expected is ( title ). /srv/www/obs/frontend/tmp/opensuse_frontend_validator.7942.0 fails to validate ): /lib/opensuse/validator.rb:155:in `validate' /lib/opensuse/validator.rb:52:in `validate_incoming_xml' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:399:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:399:in `call_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:394:in `each' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:394:in `call_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:383:in `before_action' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:365:in `perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in `perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in `process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in `process' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:150:in `process_request' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:54:in `process!' /usr/lib/ruby/vendor_ruby/1.8/fcgi.rb:612:in `each_cgi' /usr/lib/ruby/vendor_ruby/1.8/fcgi.rb:609:in `each' /usr/lib/ruby/vendor_ruby/1.8/fcgi.rb:609:in `each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:53:in `process!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:23:in `process!' /srv/www/obs/frontend/public/dispatch.fcgi:24 [I|# 7942] Rendering status [I|# 7942] errorcode 'uncaught_exception' - validation failed, output: /srv/www/obs/frontend/tmp/opensuse_frontend_validator.7942.0:2: element repository: Schemas validity error : Element 'repository': This element is not expected. Expected is ( title ). /srv/www/obs/frontend/tmp/opensuse_frontend_validator.7942.0 fails to validate [I|# 7942] Rendering status (500) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=238672 ------- Comment #1 from poeml@novell.com 2007-01-25 05:16 MST ------- It looks correct to me: In /srv/www/docs/api/frontend/project.xsd: <xs:element name="arch" type="xs:string"> <xs:annotation> <xs:documentation> Hardware architecture. </xs:documentation> </xs:annotation> </xs:element> Here's the leftover file: # cat /srv/www/obs/frontend/tmp/opensuse_frontend_validator.7942.0 <project name="openSUSE:10.2"> <repository status='disabled' name='standard'> <arch>ppc</arch> </repository> <title>the openSUSE 10.2 distribution</title> <description></description> </project> validates fine for me... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=238672 ------- Comment #2 from poeml@novell.com 2007-01-25 05:33 MST ------- Okay, ignore the above error messages. They are totally bogus, I must have done wrong something else there. Anyway, here is the real error message: [D|# 7942] Save Project [D|# 7942] XML <project name='openSUSE:10.2'> <title>openSUSE 10.2 distribution</title> <description>openSUSE 10.2 distribution.</description> <person role='maintainer' userid='Admin'/><repository name='standard'> <arch>ppc</arch> </repository></project> [D|# 7942] [BSSQL] saving object [D|# 7942] SQL (0.000669) BEGIN [D|# 7942] DbProject Load (0.002014) SELECT * FROM db_projects WHERE (name = BINARY 'openSUSE:10.2') LIMIT 1 [D|# 7942] SQL (0.001648) INSERT INTO db_projects (`name`, `updated_at`, `title`, `description`, `created_at`) VALUES('openSUSE:10.2', '2007-01-25 13:19:47', 'openSUSE 10.2 distribution', NULL, '2007-01-25 13:19:47') [D|# 7942] DbProject Update (0.002083) UPDATE db_projects SET `created_at` = '2007-01-25 13:19:47', `title` = 'openSUSE 10.2 distribution', `description` = 'openSUSE 10.2 distribution.', `updated_at` = '2007-01-25 13:19:47', `name` = 'openSUSE:10.2' WHERE id = 6 [D|# 7942] User Load (0.002903) SELECT bu.*, r.title AS role_name FROM users bu, project_user_role_relationships purr, bs_roles r WHERE (bu.id = purr.bs_user_id AND purr.db_project_id = 6 AND r.id = purr.bs_role_id) [D|# 7942] User Load (0.002597) SELECT * FROM users WHERE (users.`login` = 'Admin' ) LIMIT 1 [D|# 7942] BsRole Load (0.001385) SELECT * FROM bs_roles [D|# 7942] BsRole Columns (0.004080) SHOW FIELDS FROM bs_roles [D|# 7942] ProjectUserRoleRelationship Columns (0.004689) SHOW FIELDS FROM project_user_role_relationships [D|# 7942] SQL (0.001424) INSERT INTO project_user_role_relationships (`bs_role_id`, `db_project_id`, `bs_user_id`) VALUES(1, 6, 1) [D|# 7942] Tag Load (0.002391) SELECT tags.* FROM tags INNER JOIN taggings ON tags.id = taggings.tag_id WHERE (taggings.taggable_id = 6 AND taggings.taggable_type = 'DbProject') [D|# 7942] Repository Load (0.001686) SELECT * FROM repositories WHERE (repositories.db_project_id = 6) [D|# 7942] adding repository 'standard' [D|# 7942] Repository Columns (0.004628) SHOW FIELDS FROM repositories [D|# 7942] SQL (0.001445) INSERT INTO repositories (`name`, `db_project_id`) VALUES('standard', 6) [D|# 7942] PathElement Load (0.001992) SELECT * FROM path_elements WHERE (path_elements.parent_id = 3) [D|# 7942] Join Table Columns (0.004330) SHOW FIELDS FROM architectures_repositories [D|# 7942] Architecture Load (0.002100) SELECT * FROM architectures INNER JOIN architectures_repositories ON architectures.id = architectures_repositories.architecture_id WHERE (architectures_repositories.repository_id = 3 ) [D|# 7942] Architecture Load (0.001519) SELECT * FROM architectures [D|# 7942] Architecture Columns (0.004146) SHOW FIELDS FROM architectures [D|# 7942] SQL (0.002426) ROLLBACK [F|# 7942] RuntimeError (unknown architecture: 'ppc'): /app/models/db_project.rb:163:in `store_axml' /srv/www/obs/common/lib/activexml/node.rb:227:in `call' /srv/www/obs/common/lib/activexml/node.rb:227:in `method_missing' /usr/lib/ruby/1.8/rexml/element.rb:939:in `each' /usr/lib/ruby/1.8/rexml/xpath.rb:53:in `each' /usr/lib/ruby/1.8/rexml/element.rb:939:in `each' /srv/www/obs/common/lib/activexml/node.rb:225:in `method_missing' /app/models/db_project.rb:161:in `store_axml' /srv/www/obs/common/lib/activexml/node.rb:227:in `call' /srv/www/obs/common/lib/activexml/node.rb:227:in `method_missing' /usr/lib/ruby/1.8/rexml/element.rb:939:in `each' /usr/lib/ruby/1.8/rexml/xpath.rb:53:in `each' /usr/lib/ruby/1.8/rexml/element.rb:939:in `each' /srv/www/obs/common/lib/activexml/node.rb:225:in `method_missing' /app/models/db_project.rb:134:in `store_axml' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/database_statements.rb:51:in `transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/transactions.rb:91:in `transaction' /app/models/db_project.rb:43:in `store_axml' /app/models/db_project.rb:21:in `store_axml' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/database_statements.rb:51:in `transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/transactions.rb:91:in `transaction' /app/models/db_project.rb:17:in `store_axml' /srv/www/obs/common/lib/activexml/transport.rb:227:in `save' /srv/www/obs/common/lib/activexml/base.rb:90:in `save' /app/controllers/source_controller.rb:260:in `project_meta' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in `perform_action_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in `perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in `process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in `process' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:150:in `process_request' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:54:in `process!' /usr/lib/ruby/vendor_ruby/1.8/fcgi.rb:612:in `each_cgi' /usr/lib/ruby/vendor_ruby/1.8/fcgi.rb:609:in `each' /usr/lib/ruby/vendor_ruby/1.8/fcgi.rb:609:in `each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:53:in `process!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:23:in `process!' /srv/www/obs/frontend/public/dispatch.fcgi:24 [I|# 7942] Rendering status [I|# 7942] errorcode 'uncaught_exception' - unknown architecture: 'ppc' [I|# 7942] Rendering status (500) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=238672 ------- Comment #3 from poeml@novell.com 2007-01-25 05:36 MST ------- architectures in the "architectures" table are created infrontend/db/migrate/004_add_repositories.rb, Architecture.create :name => "i586" Architecture.create :name => "x86_64" But maybe the api should create them on the fly if a new one is entered? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=238672 ------- Comment #4 from poeml@novell.com 2007-01-25 05:54 MST ------- I'm committing the following fix for now: Index: buildservice/src/frontend/db/migrate/004_add_repositories.rb =================================================================== --- buildservice/src/frontend/db/migrate/004_add_repositories.rb (revision 1106) +++ buildservice/src/frontend/db/migrate/004_add_repositories.rb (working copy) @@ -24,6 +24,15 @@ Architecture.create :name => "i586" Architecture.create :name => "x86_64" + Architecture.create :name => "ppc" + Architecture.create :name => "ppc64" + Architecture.create :name => "s390" + Architecture.create :name => "s390x" + Architecture.create :name => "ia64" + Architecture.create :name => "mips" + Architecture.create :name => "armv4l" + Architecture.create :name => "sparc" + Architecture.create :name => "sparc64" create_table :architectures_repositories, :id => false do |t| t.column "repository_id", :integer -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=238672 poeml@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|Major |Normal ------- Comment #5 from poeml@novell.com 2007-01-25 06:54 MST ------- Solved in a better way now, by adding a new migration for the change. (Thanks David) I'm leaving it open for the experts to think about dynamically handling it. Or we could just document how to create archs manually... don't know. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=238672 chrubis@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |adrian@novell.com |screening@forge.provo.novell| |.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=238672 Adrian Schröter <adrian@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|adrian@novell.com |abauer@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=238672 User martin.mohring@5etech.eu added comment https://bugzilla.novell.com/show_bug.cgi?id=238672#c6 Martin Mohring <martin.mohring@5etech.eu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.mohring@5etech.eu --- Comment #6 from Martin Mohring <martin.mohring@5etech.eu> 2008-07-07 14:59:05 MDT --- I am testing ppc arch regularily, so arch other than x86 definitely work. Also we are now working on cross-build, where I have arm and sh4 also working without compile hosts. Peter is right: in the future, the backend should hand back to upper layers what it can do. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com