Mirroring.pm: sender and receiver are inverted at mirroring push time.

7 views
Skip to first unread message

lin feng

unread,
Feb 12, 2022, 6:06:20 PM2/12/22
to gito...@googlegroups.com
Hello,


I'm facing an issue with mirroring feature, and I suppose I missed something trivial... but i dont understand what.

Or maybe I found a BUG, but well... i dont think so.


So I have a master "servergit" and a slave "copygit".

They are configured accordignly to the README. Therefore I can ssh to them and get expected answer.

I also did give proper name in rc file (servergit on server side, and copygit for the copy), and enabled mirror feature.


On the master and copy  I have


> cat conf/gitolite.conf

repo gitolite-admin

   RW+     =   lfeng 

   option mirror.master = "servergit"

   option mirror.copies = "copygit"

   option mirror.copies.nosync = "copygit"

   option mirror.redirectOK = all


If I push from the server, i get following error:

----------

WARNING: previous mirror push of repo 'gitolite-admin' to host 'copygit' failed, status is:

2022-02-12.15:53:45 73557 FATAL: copygit: 'copygit' is not the master for 'gitolite-admin'

2022-02-12.15:53:45 73557 fatal: Could not read from remote repository.

2022-02-12.15:53:45 73557

2022-02-12.15:53:45 73557 Please make sure you have the correct access rights

2022-02-12.15:53:45 73557 and the repository exists.

----------

WARNING: manual mirror push pending for 'copygit'

Everything up-to-date


On the slave side, I have following logs:

2022-02-12.14:29:29 33219 ssh ARGV=server-copygit SOC=git-receive-pack 'gitolite-admin' FROM=192.168.1.7

2022-02-12.14:29:29 33219 mirror,pre_git,gitolite-admin,user=,sender=copygit,mode=copy

2022-02-12.14:29:29 33219 die copygit: 'copygit' is not the master for 'gitolite-admin'


192.168.1.7 is the IP of servergit. Therefore the first line is correct: the push did come from servergit.

On next line, we can see sender=copygit which is wrong.


If I update manually lib/gitolite/lib/gitolite/Triggers/Mirroring.pm, at the begining, arround the line 22

And I enforce sender=servergit. Then gitolite mirrorring is working as expected.


sub input {

 ....

    # note: we treat %rc as our own internal "poor man's %ENV"

    #$rc{FROM_SERVER} = $1;

    $rc{FROM_SERVER} = "servergit";

    trace( 3, "from_server: $1" );

....


Any idea what I missed ?

Thank you very much.


Sitaram Chamarty

unread,
Feb 14, 2022, 7:51:40 PM2/14/22
to lin feng, gito...@googlegroups.com
Hi

I'll only be able to look at this in detail next weekend, due to
some unexpected travel that took away many days of my time
during this past 10 days or so.

But, if you say this works:

On Sat, Feb 12, 2022 at 04:52:46PM -0000, 'lin feng' via gitolite wrote:

> #$rc{FROM_SERVER} = $1;
> $rc{FROM_SERVER} = "servergit";

then the first thing to look for is ~/.ssh/authorized_keys on
both the machines and make sure the argument is correct.

Maybe there has been some key confusion in the past that was
manually fixed up?

lin feng

unread,
Feb 17, 2022, 8:08:13 PM2/17/22
to Sitaram Chamarty, gito...@googlegroups.com
Hello,


On Tuesday, February 15, 2022 1:51 AM, Sitaram Chamarty <sita...@gmail.com> wrote:

> then the first thing to look for is ~/.ssh/authorized_keys on

> both the machines and make sure the argument is correct.

>

> Maybe there has been some key confusion in the past that was

> manually fixed up?


Well, I m also traveling, and I cannot access to the server.

But the client seems good to me.

For the server, I will check that in next saturday. (in 10 days).

Thank you.


Reply all
Reply to author
Forward
0 new messages