Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: Problem durring migration of database from FF5.2.2 to FF6.0.5 [ Reply ]
By: Franck Villaume on 2017-06-16 16:31
[forum:1040]
You are absolutely right.

There are a segregation of permission on nss_* tables.
And the permissions on folder have changed.
I've missed these points. Sorry.

RE: Problem durring migration of database from FF5.2.2 to FF6.0.5 [ Reply ]
By: Christophe Gengembre on 2017-06-16 14:36
[forum:1039]
Thank you for your help Franck.

I explore nss* tables. Their contents seems to be proper.
I launched ~/bin/refresh_nss.php to be sure.
But it didn't solve the problem. I got the sames errors in log files.

But I saw that there was an error in postgres logs :
2017-06-15 14:04:46 CEST ERROR: permission denied for relation nss_usergroups
2017-06-15 14:04:46 CEST STATEMENT: SELECT MAX(last_modified_date) AS lastmodified FROM nss_usergroups

So I explore privileges on the table nss_usergroups and I saw that access privileges were not set :
fusionforge=# \z nss_usergroups
Access privileges
Schema | Name | Type | Access privileges | Column access privileges
--------+----------------+-------+-------------------+--------------------------
public | nss_usergroups | table | |
(1 row)
So I set privileges to be the same as in my blank installation test.
Then I had the same problem with nss_passwd table. So I set privileges in the same way.

Then a new error message was displaied when I click [browse subversion repository] :
---
An Exception Has Occurred

The root "<project name>" is unknown. If you believe the value is correct, then please double-check your configuration.
---

On my blank installation test with a test project, I remark that the owner of the repository is root, and that :
- the group owner id of the project repository is the value of the gid define in the nss_groups table for the group named <proj name>_scmro
- the group owner id of the content of the project repository is the value of the gid define in the nss_groups table for the group named <proj name>_scmrw.

Thus I set the groups owners of the project repository on my migrated installation to be in accordance with the groups defined in the table nss_groups.

And it solved my problem ! I can now browse a project repository on the forge thanks to viewvc.

In my previous installation of fusionforge, the owner:group of the repositories were apache:apache.

So I have to write a script to set the group owners of the repositories in accordance to the database for each project hosted by the forge.

am I right or is there an other solution ?

Thanks.
Regards.
Christophe.


RE: Problem durring migration of database from FF5.2.2 to FF6.0.5 [ Reply ]
By: Franck Villaume on 2017-06-14 13:18
[forum:1038]
There is no Unix user created (no new entry in /etc/passwd or /etc/shadow). Fusionforge relies on nss integration. This is mandatory with the usage of mod_itk to offers simultaneous ssh/http access to git/svn repositories.

In your case, that means the nss* tables are not accurate. You need to regenerate the nss tables.
Take a look at ~/bin/refresh_nss.php script.
The description of the used nss* tables can be find in the /etc/nss-pgsql.conf & /etc/nss-pgsql-root.conf

RE: Problem durring migration of database from FF5.2.2 to FF6.0.5 [ Reply ]
By: Christophe Gengembre on 2017-06-14 12:50
[forum:1037]
I noticed that on a blank installation of FF6.0.5, if I create a FF user, then an unix user is created.

However, there is no new unix users after migration.

Is there an other script to launch to complete migration ?

Thanks in advance.

RE: Problem durring migration of database from FF5.2.2 to FF6.0.5 [ Reply ]
By: Christophe Gengembre on 2017-06-14 12:32
[forum:1036]
Hello,

As I promised, I come back to say how migration append.

I had to drop the type named systask_status in the database because execution of 20141210-systasks.sql tried to create it.

Then all scripts ran correctly.

I have an other problem : when I try to browse sources of a project (link [Browse Subversion Repository] of a project), I get an error.

Here is the message that written instead of the repository :

-----
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
----

Here is the server error log message when I try to follow the link [Browse Subversion Repository] in a project.

[Wed Jun 14 14:17:50.953142 2017] [mpm_itk:error] [pid 9858] AssignUserIDExpr returned 'gengembre', which is not a valid user name

Thanks in advance for your help.

Regards
Christophe.



RE: Problem durring migration of database from FF5.2.2 to FF6.0.5 [ Reply ]
By: Christophe Gengembre on 2017-06-12 16:26
[forum:1035]
Hi,

time is going too fast.

Thanks Franck.
Ok, that is clear. I set the foreign key value to a value that exists in people_job_category.
Then the scrip ran correctly.

One of the next scrips generate errors I can correct myself.

I'll come back to say how my migration finished ...

Yours.
Thanks again.
Christophe.

RE: Problem durring migration of database from FF5.2.2 to FF6.0.5 [ Reply ]
By: Franck Villaume on 2017-06-01 16:56
[forum:1031]
Hi,

the goal of this script is to enforce foreign key to avoid your situation where data are missing.
It seems that you have a "people_job" entry with category_id set to 0 while there are no category id 0 in "people_job_category"

You should update your data and set all rows with category_id equals to 0 to an existing category id as described in "people_job_category"

Problem durring migration of database from FF5.2.2 to FF6.0.5 [ Reply ]
By: Christophe Gengembre on 2017-06-01 16:23
[forum:1030]
Hello,

my installation of ff5.2.2 and of ff6.0.5 are not on the same machine.

this is how I proceed :
- I install a new ff6.0.5 with apt-get install fusionforge. Ok it works.
- I dump data base from my old ff5.2.2 installation
- I modified the dumped file so that the tables owner is fusionforge (owner was gforge)
- I emptied ff6.0.5 data base
- I filled ff6.0.5 db with the dumped file above.
- Then I ran the php file upgrade.php located in /usr/share/fusionforge/post-install.d/db

A lot of scripts launched by upgrade.php ran correctly until it launch 20121026-add-constraints.sql.
This is the error I obtained :

Running script: 20121026-add-constraints.sql
SQL: ALTER TABLE people_job ADD FOREIGN KEY (category_id) REFERENCES people_job_category ON DELETE CASCADE ON UPDATE CASCADE;
SQL> ERROR: insert or update on table "people_job" violates foreign key constraint "people_job_category_id_fkey"
DETAIL: Key (category_id)=(0) is not present in table "people_job_category".
ERROR: insert or update on table "people_job" violates foreign key constraint "people_job_category_id_fkey"
DETAIL: Key (category_id)=(0) is not present in table "people_job_category".
QUERY: ALTER TABLE people_job ADD FOREIGN KEY (category_id) REFERENCES people_job_category ON DELETE CASCADE ON UPDATE CASCADE;

Thanks in advance for any help.
Regards.
Christophe.