{trac,git}.sagemath.org downtime Wednesday 6/22

302 views
Skip to first unread message

Erik Bray

unread,
Jun 20, 2016, 11:18:49 AM6/20/16
to sage-devel, sagemat...@googlegroups.com
Hi all,

As decided toward the end of another recent thread [1] I willl be
taking down the server at UW which hosts both trac.sagemath.org and
git.sagemath.org, starting around 8:00 A.M. CEST. There are at least
three reasons for this:

1. Mitigate issues related to reliance upon university IT
infrastructure over which we have little control [2][3] or influence
2. Move to tier 1 cloud-based hosting for greater ease of deployment
and (hopefully) better reliability
3. Address current and ongoing preformance / access issues with the
Trac site, which are possibly related to 1

An additional change to be aware of is that access to
trac.sagemath.org, as well as the git web interface at
git.sagemath.org will be switched to HTTPS *only*. HTTP redirects
will be set up, but please update any URLs nonetheless.

Other than that, with a little luck you should notice few or any
differences. Please keep in mind though that the current Sage Trac
infrastructure has a layer of grime and mold over it, and it's
entirely possible I've missed a few spots while shining it up. So if
anything isn't working after the migration please be patient and
cooperate by sending notice either to
sagemat...@googlegroups.com, or to me personally*.

Best,
Erik

* The offer to e-mail me personally about such issues expires some
indeterminate amount of time after the migration is completed. I want
to be on-call for migration-related issues, but in general support
issues should be sent to one of the mailing lists where they can be
handled by the best personal available at the moment.

[1] https://groups.google.com/d/msg/sage-devel/EKhgXsdKMhY/52fKpHDBAQAJ
[2] https://groups.google.com/d/msg/sage-devel/Xw6CNq1lyiI/aeyT5TluDQAJ
[3] https://groups.google.com/d/msg/sage-devel/Xw6CNq1lyiI/APzgctSUDQAJ

Erik Bray

unread,
Jun 20, 2016, 11:52:36 AM6/20/16
to sage-devel, sagemat...@googlegroups.com
On Mon, Jun 20, 2016 at 5:18 PM, Erik Bray <erik....@gmail.com> wrote:
> Hi all,
>
> As decided toward the end of another recent thread [1] I willl be
> taking down the server at UW which hosts both trac.sagemath.org and
> git.sagemath.org, starting around 8:00 A.M. CEST. There are at least
> three reasons for this:

Two other notes I meant to include:

1) I don't expect the migration to take more than an hour or two. If
for some reason something does not go according to plan it's no
problem to bring the current server back online without making the DNS
switch. I don't anticipate any specific problems though.

2) wiki.sagemath.org is also hosted at UW, but on a different machine,
and is not being migrated at the same time. There are parallel
efforts ongoing to migrate the wiki, but this migration will not be
performed at the same time.

Erik Bray

unread,
Jun 22, 2016, 2:01:11 AM6/22/16
to sage-devel, sagemat...@googlegroups.com, sagemat...@googlegroups.com
trac.sagemath.org going down now, as planned.

push access to git.sagemath.org will be disabled a few minutes later,
so don't plan on making any pushes to the repository in the next few
minutes.

Will update here once services are back online.

Thanks for your patience,
Erik

On Mon, Jun 20, 2016 at 5:18 PM, Erik Bray <erik....@gmail.com> wrote:

Erik Bray

unread,
Jun 22, 2016, 4:26:44 AM6/22/16
to sage-devel, sagemat...@googlegroups.com
git and trac should both be back up again.

The migration took a bit longer than expected. Reasons being:

1) Transferring data from old server to new server took longer than
previous tests suggested
2) I initially loaded the wrong DB dump into the postgres database,
and had to redo the database load

As a reminder http is now redirected to https, so please update your URLs.

Please let me know via e-mail, and also CC
sagemat...@googlegroups.com if you notice something amiss.

Thanks,
Erik

Jeroen Demeyer

unread,
Jun 22, 2016, 4:34:52 AM6/22/16
to sage-devel, sagemath-admins, Erik Bray
The "branch" and "dependencies" fields are no longer hyperlinked.

On https://trac.sagemath.org/ticket/20767 for example, I should be able
to click on the branch and the various dependencies.

Dima Pasechnik

unread,
Jun 22, 2016, 4:42:43 AM6/22/16
to sagemath-admins, sage-...@googlegroups.com
Currently I am getting on https://trac.sagemath.org/ (or on any ticket I tried)

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/trac/web/api.py", line 602, in send_error
    data, 'text/html')
  File "/usr/local/lib/python2.7/dist-packages/trac/web/chrome.py", line 1111, in render_template
    if self.stream_filters:
  File "/usr/local/lib/python2.7/dist-packages/trac/core.py", line 82, in extensions
    components = [component.compmgr[cls] for cls in classes]
  File "/usr/local/lib/python2.7/dist-packages/trac/core.py", line 208, in __getitem__
    component = cls(self)
  File "/usr/local/lib/python2.7/dist-packages/trac/core.py", line 144, in __call__
    self.__init__()
  File "/usr/local/lib/python2.7/dist-packages/sage_trac/ticket_branch.py", line 37, in __init__
    git_merger.GitMerger.__init__(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sage_trac/git_merger.py", line 28, in __init__
    GitBase.__init__(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sage_trac/common.py", line 66, in __init__
    raise TracError('one of cgit_url or cgit_hot must be set in '
TracError: one of cgit_url or cgit_hot must be set in trac.ini

Erik Bray

unread,
Jun 22, 2016, 4:51:20 AM6/22/16
to Jeroen Demeyer, sage-devel, sagemath-admins
Fixed.

Dima Pasechnik

unread,
Jun 22, 2016, 5:20:10 AM6/22/16
to sage-devel, sagemat...@googlegroups.com, sage-support
there is an issue related to "native git" protocol used to communicate with git server on trac.sagemath.
Namely, if you try to use the URL git://trac.sagemath.org/sage.git for (say) fetch it does not get through.
(probably a GCE firewall blocks the corresponding port).

Using the ssh URL, i.e. g...@trac.sagemath.org:sage.git does work.

Dima

Erik Bray

unread,
Jun 22, 2016, 5:27:15 AM6/22/16
to sagemath-admins, sage-devel, sage-support
On Wed, Jun 22, 2016 at 11:20 AM, Dima Pasechnik <dim...@gmail.com> wrote:
> there is an issue related to "native git" protocol used to communicate with
> git server on trac.sagemath.
> Namely, if you try to use the URL git://trac.sagemath.org/sage.git for (say)
> fetch it does not get through.

This is fixed now.

> (probably a GCE firewall blocks the corresponding port).

Exactly right.
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "sagemath-admins" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sagemath-admi...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Jeroen Demeyer

unread,
Jun 22, 2016, 7:43:02 AM6/22/16
to sage-...@googlegroups.com
Another issue: I no longer get e-mails from Trac. The last e-mail that I
received was on 06:25 CEST (i.e. Paris time). I received nothing more
after that, even though some tickets were changed that I am active on
(e.g. #20852).

Erik Bray

unread,
Jun 22, 2016, 7:50:15 AM6/22/16
to sage-devel
Thanks. This is probably related:
https://cloud.google.com/compute/docs/tutorials/sending-mail/

I'll get that patched up.

Andrew

unread,
Jun 22, 2016, 11:35:01 AM6/22/16
to sage-devel
When I try to log in to the new trac server I get the error:

Oops…

Trac detected an internal error:
AttributeError: 'FakeSession' object has no attribute 'authenticated'

There was an internal error in Trac. It is recommended that you notify your local Trac administrator with the information needed to reproduce the issue.

To that end, you could

a ticket.

The action that triggered the error was:

POST: /login

TracGuide — The Trac User and Administration Guide


I have had this problem since Erik started setting up the new server, and no one else seems to have this issue, so it must be something about my set up. If any one has any idea what might be wrong please let me know.

Secondly, as trac is now served via a https connection all of the references to http://trac.sagemath.org/ in the sage source and documentation need to be updated. Has anyone touched this yet? If not then I guess I am volunteering (if my connection issue to the trac serverer can be resolved, of course!).

Andrew

Erik Bray

unread,
Jun 22, 2016, 11:41:21 AM6/22/16
to sage-devel
On Wed, Jun 22, 2016 at 5:35 PM, Andrew <andrew...@gmail.com> wrote:
> When I try to log in to the new trac server I get the error:
>
> Oops…
>
> Trac detected an internal error:
>
> AttributeError: 'FakeSession' object has no attribute 'authenticated'
>
> There was an internal error in Trac. It is recommended that you notify your
> local Trac administrator with the information needed to reproduce the issue.
>
> To that end, you could
>
> a ticket.
>
> The action that triggered the error was:
>
> POST: /login
>
> TracGuide — The Trac User and Administration Guide
>
>
> I have had this problem since Erik started setting up the new server, and no
> one else seems to have this issue, so it must be something about my set up.
> If any one has any idea what might be wrong please let me know.

I think it's the "." in your username; Trac has decided that it does
not like that (since when, I don't know...)

I'll see what I can do about it.

> Secondly, as trac is now served via a https connection all of the references
> to http://trac.sagemath.org/ in the sage source and documentation need to be
> updated. Has anyone touched this yet? If not then I guess I am volunteering
> (if my connection issue to the trac serverer can be resolved, of course!).

Have at it!

> On Wednesday, 22 June 2016 13:50:15 UTC+2, Erik Bray wrote:
>>
>> On Wed, Jun 22, 2016 at 1:42 PM, Jeroen Demeyer <jdem...@cage.ugent.be>
>> wrote:
>> > Another issue: I no longer get e-mails from Trac. The last e-mail that I
>> > received was on 06:25 CEST (i.e. Paris time). I received nothing more
>> > after
>> > that, even though some tickets were changed that I am active on (e.g.
>> > #20852).
>>
>> Thanks. This is probably related:
>> https://cloud.google.com/compute/docs/tutorials/sending-mail/
>>
>> I'll get that patched up.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.

Erik Bray

unread,
Jun 22, 2016, 11:48:26 AM6/22/16
to sage-devel
On Wed, Jun 22, 2016 at 5:41 PM, Erik Bray <erik....@gmail.com> wrote:
> On Wed, Jun 22, 2016 at 5:35 PM, Andrew <andrew...@gmail.com> wrote:
>> When I try to log in to the new trac server I get the error:
>>
>> Oops…
>>
>> Trac detected an internal error:
>>
>> AttributeError: 'FakeSession' object has no attribute 'authenticated'
>>
>> There was an internal error in Trac. It is recommended that you notify your
>> local Trac administrator with the information needed to reproduce the issue.
>>
>> To that end, you could
>>
>> a ticket.
>>
>> The action that triggered the error was:
>>
>> POST: /login
>>
>> TracGuide — The Trac User and Administration Guide
>>
>>
>> I have had this problem since Erik started setting up the new server, and no
>> one else seems to have this issue, so it must be something about my set up.
>> If any one has any idea what might be wrong please let me know.
>
> I think it's the "." in your username; Trac has decided that it does
> not like that (since when, I don't know...)
>
> I'll see what I can do about it.

The problem seems to be this: https://trac.edgewall.org/changeset/14121

It is not a terribly new change, but as I upgraded Trac while doing
the upgrade, it was still not an issue with the last version of Trac
that was in use. I will hot-patch Trac for now so that you can log
in, and will follow up on this more properly ASAP (FWIW it should also
be possible to work around this with the sage_trac plugin without
needing to patch Trac. This is not unprecedented--I used to maintain
a plugin that was nothing bug fixes for Trac bugs :)

Volker Braun

unread,
Jun 22, 2016, 1:12:54 PM6/22/16
to sage-devel, sagemat...@googlegroups.com
The authentication changed, we used to have http digest (browser popup window, with realm) and now its the trac builtin one. This breaks the git-trac script as it tries to authenticate over http digest. I can fix it up but first let me ask: Is that going to stay?

Frédéric Chapoton

unread,
Jun 22, 2016, 1:15:01 PM6/22/16
to sage-devel, sagemat...@googlegroups.com
Here are 2 distinct problems, that look similar.

(1) The new trac seems to have broken the patchbots, with the following traceback. Maybe just because of https, but not sure.

Traceback (most recent call last):
  File "sage_patchbot/patchbot.py", line 997, in test_a_ticket
  File "sage_patchbot/trac.py", line 297, in pull_from_trac
  File "sage_patchbot/trac.py", line 116, in scrape
  File "sage_patchbot/trac.py", line 376, in load
  File "sage_patchbot/trac_ticket.py", line 160, in TracTicket
  File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1587, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request
    return self.single_request(host, handler, request_body, verbose)
  File "sage_patchbot/digest_transport_py2.py", line 116, in single_request
  File "/usr/lib/python2.7/xmlrpclib.py", line 1482, in parse_response
    return u.close()
  File "/usr/lib/python2.7/xmlrpclib.py", line 792, in close
    raise ResponseError()
ResponseError: ResponseError()
2016-06-22 17:12:01
2 seconds
[2016-06-22 17:12:03] #20629 raises an exception: ResponseError()
Traceback (most recent call last):
  File "sage_patchbot/patchbot.py", line 997, in test_a_ticket
  File "sage_patchbot/trac.py", line 297, in pull_from_trac
  File "sage_patchbot/trac.py", line 116, in scrape
  File "sage_patchbot/trac.py", line 376, in load
  File "sage_patchbot/trac_ticket.py", line 160, in TracTicket
  File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1587, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request
    return self.single_request(host, handler, request_body, verbose)
  File "sage_patchbot/digest_transport_py2.py", line 116, in single_request
  File "/usr/lib/python2.7/xmlrpclib.py", line 1482, in parse_response
    return u.close()
  File "/usr/lib/python2.7/xmlrpclib.py", line 792, in close
    raise ResponseError()
ResponseError: ResponseError()

(2) when pushing using git push trac, it worked with the following similar warning:

remote: Traceback (most recent call last):
remote:   File "./hooks/post-receive.d/01-trac_branch", line 180, in <module>
remote:     for number, ticket in trac.ticket_iter(branch):
remote:   File "./hooks/post-receive.d/01-trac_branch", line 75, in ticket_iter
remote:     for result in self.rpc.search.branch(branch):
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
remote:     return self.__send(self.__name, args)
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 1587, in __request
remote:     verbose=self.__verbose
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request
remote:     return self.single_request(host, handler, request_body, verbose)
remote:   File "/srv/git/repositories/sage.git/hooks/post-receive.d/digest_transport.py", line 154, in single_request
remote:     return self.parse_response(response)
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 1482, in parse_response
remote:     return u.close()
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 792, in close
remote:     raise ResponseError()
remote: xmlrpclib.ResponseError: ResponseError()

Volker Braun

unread,
Jun 22, 2016, 1:15:58 PM6/22/16
to sage-devel, sagemat...@googlegroups.com
PS: I can't seem to authenticate over xmlrpc; Did you follow the advice at:


Volker Braun

unread,
Jun 22, 2016, 1:19:42 PM6/22/16
to sage-devel, sagemat...@googlegroups.com
Thats because of https, you need to do the analog change that I just did on the git-trac script:

diff --git a/git_trac/digest_transport_py2.py b/git_trac/digest_transport_py2.py
index 28a8520..c030432 100644
--- a/git_trac/digest_transport_py2.py
+++ b/git_trac/digest_transport_py2.py
@@ -121,7 +121,7 @@ class DigestTransport(object, SafeTransport):
         try:
             import urlparse
             req = urllib2.Request(
-                    urlparse.urlunparse(('http', host, handler, '', '', '')),
+                    urlparse.urlunparse(('https', host, handler, '', '', '')),
                     request_body, {'Content-Type': 'text/xml',
                         'User-Agent': self.user_agent})
             response = self.opener.open(req)

Erik Bray

unread,
Jun 22, 2016, 1:23:34 PM6/22/16
to sage-devel, sagemath-admins

On Jun 22, 2016 19:12, "Volker Braun" <vbrau...@gmail.com> wrote:
>
> The authentication changed, we used to have http digest (browser popup window, with realm) and now its the trac builtin one. This breaks the git-trac script as it tries to authenticate over http digest. I can fix it up but first let me ask: Is that going to stay?

This was a requested feature.

I did worry that it could break any script that was relying on HTTP authentication but nobody indicated as much. It should be possible to login over xmlrpc or by posting to /login and storing the resulting session cookie.

Conceivably it would not be hard to provide an alternative HTTP digest backend for login as well.

Volker Braun

unread,
Jun 22, 2016, 1:48:15 PM6/22/16
to sage-devel, sagemat...@googlegroups.com
On Wednesday, June 22, 2016 at 7:23:34 PM UTC+2, Erik Bray wrote:

Conceivably it would not be hard to provide an alternative HTTP digest backend for login as well.


That would be the easiest solution... can you set it up?

leif

unread,
Jun 22, 2016, 1:52:55 PM6/22/16
to sage-...@googlegroups.com
There are at least 17 victims:

a.serrano
aly.deines
andrew.mathas
aram.dermenjian
daniel.disegni
edward.scheinerman
f.poloni
fredrik.johansson
goodok.alex
jan.wabbersen
jeff.kantor
kevin.stueve
Vincent.Neri
razvan.mezei
robert.marik
s.r.doty
syam.in


-leif

P.S.: To me, fixing trac notifications is more important... ;-)

Paul Masson

unread,
Jun 22, 2016, 7:05:17 PM6/22/16
to sage-devel, sagemat...@googlegroups.com
Since no one has said this yet, a big thank you to Erik and everyone else who helped get the Trac server to its new home!

jhonrubia6

unread,
Jun 23, 2016, 3:44:29 AM6/23/16
to sage-devel, sagemat...@googlegroups.com
Yeah!. Thanks Erik.


Erik Bray

unread,
Jun 23, 2016, 4:43:53 AM6/23/16
to sage-devel, sagemath-admins
Let me take a closer look at that documentation you pointed to
earlier. If I understand correctly, adding that option to the
AccountManagerPlugin will allow /login/xmlrpc to be handled by the web
server (where in turn I can enable htdigest authentication).

Erik Bray

unread,
Jun 23, 2016, 5:05:11 AM6/23/16
to sage-devel, sagemath-admins
Okay, I have re-enabled HTTP digest authentication on /login/xmlrpc as
before. Please let me know if that fixes things.
Sorry about that--I should have gone with my first instinct on it.

Erik

Volker Braun

unread,
Jun 23, 2016, 5:10:06 AM6/23/16
to sage-devel, sagemat...@googlegroups.com
I'm still getting authentication errors:

xmlrpclib.Fault: <Fault 403: "TICKET_MODIFY privileges are required to perform this operation on Ticket #20581. You don't have the required permissions.">

did you also add the 

[account-manager]
environ_auth_overwrite = false

?

Erik Bray

unread,
Jun 23, 2016, 5:14:17 AM6/23/16
to sage-devel

On Jun 23, 2016 11:10, "Volker Braun" <vbrau...@gmail.com> wrote:
>
> I'm still getting authentication errors:
>
> xmlrpclib.Fault: <Fault 403: "TICKET_MODIFY privileges are required to perform this operation on Ticket #20581. You don't have the required permissions.">
>
> did you also add the 
>
> [account-manager]
> environ_auth_overwrite = false

Yes. Let me make sure that's actually working though. Also make sure the requests are definitely going through /login/xmlrpc

> On Thursday, June 23, 2016 at 11:05:11 AM UTC+2, Erik Bray wrote:
>>
>> On Thu, Jun 23, 2016 at 10:43 AM, Erik Bray <erik....@gmail.com> wrote:
>> > On Wed, Jun 22, 2016 at 7:48 PM, Volker Braun <vbrau...@gmail.com> wrote:
>> >> On Wednesday, June 22, 2016 at 7:23:34 PM UTC+2, Erik Bray wrote:
>> >>>
>> >>> Conceivably it would not be hard to provide an alternative HTTP digest
>> >>> backend for login as well.
>> >>
>> >>
>> >> That would be the easiest solution... can you set it up?
>> >
>> > Let me take a closer look at that documentation you pointed to
>> > earlier.  If I understand correctly, adding that option to the
>> > AccountManagerPlugin will allow /login/xmlrpc to be handled by the web
>> > server (where in turn I can enable htdigest authentication).
>>
>> Okay, I have re-enabled HTTP digest authentication on /login/xmlrpc as
>> before.  Please let me know if that fixes things.
>> Sorry about that--I should have gone with my first instinct on it.
>>
>> Erik
>

Erik Bray

unread,
Jun 23, 2016, 7:58:27 AM6/23/16
to sage-devel
Indeed it looks like there's some inconsistency in URLs that the
patchbot is using for RPC calls. For example I see some attempts in
the logs to POST to /login/rpc instead of /login/xmlrpc. Granted the
former definitely should work as well, so I will loosen the rule to
allow /login/rpc (as well /login/jsonrpc which technically should be
allowed to work even if we're not using it currently).

Travis Scrimshaw

unread,
Jun 23, 2016, 10:03:50 AM6/23/16
to sage-devel
Hey Erik,
   Thank you for all your work on this. However, I liked it when there would be a post on trac, and the subsequent e-mail, when there was a push to a branch on a ticket (also useful for setting the commit field automatically).

Best,
Travis

Johan S. H. Rosenkilde

unread,
Jun 23, 2016, 11:00:24 AM6/23/16
to sage-...@googlegroups.com, sagemat...@googlegroups.com
Seems like a similar patch needs to be applied to
git_trac/digest_transport.py when your system defaults to Python 3.

Best,
Johan
--

Volker Braun

unread,
Jun 23, 2016, 2:46:58 PM6/23/16
to sage-devel
Thanks, everything is working now!

David Roe

unread,
Jun 23, 2016, 10:06:22 PM6/23/16
to sage-devel
I just updated git-trac-command and tried "git trac push", and got

remote: Traceback (most recent call last):        

remote:   File "./hooks/post-receive.d/01-trac_branch", line 180, in <module>        
remote:     for number, ticket in trac.ticket_iter(branch):        
remote:   File "./hooks/post-receive.d/01-trac_branch", line 75, in ticket_iter        
remote:     for result in self.rpc.search.branch(branch):        
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__        
remote:     return self.__send(self.__name, args)        
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 1587, in __request        
remote:     verbose=self.__verbose        
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request        
remote:     return self.single_request(host, handler, request_body, verbose)        

remote:   File "/srv/git/repositories/sage.git/hooks/post-receive.d/digest_transport.py", line 154, in single_request        
remote:     return self.parse_response(response)        
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 1482, in parse_response        
remote:     return u.close()        
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 792, in close        

remote:     raise ResponseError()        
remote: xmlrpclib.ResponseError: ResponseError()        
To g...@trac.sagemath.org:sage.git
 * [new branch]      HEAD -> u/roed/p_adic_floating_point_rings

Any suggestions?
David

--

Erik Bray

unread,
Jun 24, 2016, 3:16:32 AM6/24/16
to sage-devel

On Jun 24, 2016 04:06, "David Roe" <roed...@gmail.com> wrote:
>
> I just updated git-trac-command and tried "git trac push", and got    

> remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 792, in close        
>
> remote:     raise ResponseError()        
> remote: xmlrpclib.ResponseError: ResponseError()        
>

> Any suggestions?

See previous posts on this thread concerning HTTPS. I think someone already posted the fix to this.

It seems xmlrpclib doesn't follow redirects by default, I guess. At least certainly not from HTTP to HTTPS

David Roe

unread,
Jun 24, 2016, 3:22:14 AM6/24/16
to sage-devel
On Fri, Jun 24, 2016 at 12:16 AM, Erik Bray <erik....@gmail.com> wrote:

On Jun 24, 2016 04:06, "David Roe" <roed...@gmail.com> wrote:
>
> I just updated git-trac-command and tried "git trac push", and got    
> remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 792, in close        
>
> remote:     raise ResponseError()        
> remote: xmlrpclib.ResponseError: ResponseError()        
>
> Any suggestions?

See previous posts on this thread concerning HTTPS. I think someone already posted the fix to this.


Are you referring to Volker's patch to git_trac/digest_transport_py2.py?  That seems to have been pushed to the git-trac repository and I have it; I ran "python setup.py install" after pulling.  Is there something else I'm missing?
David 

Erik Bray

unread,
Jun 24, 2016, 3:38:28 AM6/24/16
to sage-devel

On Jun 24, 2016 9:22 AM, "David Roe" <roed...@gmail.com> wrote:
>
>
>
> On Fri, Jun 24, 2016 at 12:16 AM, Erik Bray <erik....@gmail.com> wrote:
>>
>> On Jun 24, 2016 04:06, "David Roe" <roed...@gmail.com> wrote:
>> >
>> > I just updated git-trac-command and tried "git trac push", and got    
>> > remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 792, in close        
>> >
>> > remote:     raise ResponseError()        
>> > remote: xmlrpclib.ResponseError: ResponseError()        
>> >
>> > Any suggestions?
>>
>> See previous posts on this thread concerning HTTPS. I think someone already posted the fix to this.
>
>
> Are you referring to Volker's patch to git_trac/digest_transport_py2.py?  That seems to have been pushed to the git-trac repository and I have it; I ran "python setup.py install" after pulling.  Is there something else I'm missing?

It's possible the patch is missing something. I haven't looked at git_trac myself but from what I've seen there are inconsistencies in the URLs it uses to connect.

I noticed some code in the patchbot uses a global variable hard-coded in sage.env called TRAC_SERVER_URL. I forget off the top of my head (I'm on my phone right now) if that includes the 'http' or not. But if so any code that uses TRAC_SERVER_URL should be fixed as well.

Dima Pasechnik

unread,
Jun 24, 2016, 4:03:24 AM6/24/16
to sage-devel, roed...@gmail.com


On Friday, June 24, 2016 at 3:06:22 AM UTC+1, David Roe wrote:
I just updated git-trac-command and tried "git trac push", and got

remote: Traceback (most recent call last):        
remote:   File "./hooks/post-receive.d/01-trac_branch", line 180, in <module>        
remote:     for number, ticket in trac.ticket_iter(branch):        
remote:   File "./hooks/post-receive.d/01-trac_branch", line 75, in ticket_iter        
remote:     for result in self.rpc.search.branch(branch):        
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__        
remote:     return self.__send(self.__name, args)        
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 1587, in __request        
remote:     verbose=self.__verbose        
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request        
remote:     return self.single_request(host, handler, request_body, verbose)        
remote:   File "/srv/git/repositories/sage.git/hooks/post-receive.d/digest_transport.py", line 154, in single_request        
remote:     return self.parse_response(response)        
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 1482, in parse_response        
remote:     return u.close()        
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 792, in close        
remote:     raise ResponseError()        
remote: xmlrpclib.ResponseError: ResponseError()        
To g...@trac.sagemath.org:sage.git
 * [new branch]      HEAD -> u/roed/p_adic_floating_point_rings

Any suggestions?
 
needless to say, probably, but "git the hard way" works:

git  push trac HEAD:u/roed/p_adic_floating_point_rings

Travis Scrimshaw

unread,
Jun 24, 2016, 10:54:51 AM6/24/16
to sage-devel, roed...@gmail.com
That does not work for me, both before and after: I am still getting the remote issues. Although the branch is being synced on the trac server. However, it does not update the ticket (i.e., the commit field) when I push. I really would like to get an e-mail when I (or anyone else) pushes something to a ticket. My remote for "trac" is setup as in the Git The Hard Way.

Best,
Travis

 
 

Dima Pasechnik

unread,
Jun 24, 2016, 11:12:28 AM6/24/16
to sage-devel, Erik Bray
Erik, 
indeed, it is not working right:
commit does not get changed, and I get

$ git commit -a -m "test"
[m2fix 22d0952] test
 1 file changed, 1 insertion(+), 1 deletion(-)
clpc171[/home/scratch/dimpase/sage/sage/src/sage/interfaces]$ git push trac HEAD:u/dimpase/m2fix
X11 forwarding request failed on channel 0
Counting objects: 6, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 485 bytes | 0 bytes/s, done.
Total 6 (delta 5), reused 0 (delta 0)
remote: Traceback (most recent call last):
remote:   File "./hooks/post-receive.d/01-trac_branch", line 180, in <module>
remote:     for number, ticket in trac.ticket_iter(branch):
remote:   File "./hooks/post-receive.d/01-trac_branch", line 75, in ticket_iter
remote:     for result in self.rpc.search.branch(branch):
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
remote:     return self.__send(self.__name, args)
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 1587, in __request
remote:     verbose=self.__verbose
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request
remote:     return self.single_request(host, handler, request_body, verbose)
remote:   File "/srv/git/repositories/sage.git/hooks/post-receive.d/digest_transport.py", line 154, in single_request
remote:     return self.parse_response(response)
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 1482, in parse_response
remote:     return u.close()
remote:   File "/usr/lib/python2.7/xmlrpclib.py", line 792, in close
remote:     raise ResponseError()
remote: xmlrpclib.ResponseError: ResponseError()
To g...@trac.sagemath.org:sage.git
   0c1f89f..22d0952  HEAD -> u/dimpase/m2fix

It appears that git/trac interaction is half-broken.
Specifically I am testing https://trac.sagemath.org/ticket/20659

Dima

Volker Braun

unread,
Jun 24, 2016, 1:23:12 PM6/24/16
to sage-devel, roed...@gmail.com, Erik Bray
The error is from the remote side and only echo'ed locally; This is not git-trac's fault but the fault of our git post-receive hook.

Eric, is the post-receive hook still the same as in https://github.com/sagemath/trac-githooks/blob/master/post-receive.d/digest_transport.py? That file needs to have http->https fixed as in 


diff --git a/git_trac/digest_transport_py2.py b/git_trac/digest_transport_py2.py
index 28a8520..c030432 100644
--- a/git_trac/digest_transport_py2.py
+++ b/git_trac/digest_transport_py2.py
@@ -121,7 +121,7 @@ class DigestTransport(object, SafeTransport):
         try:
             import urlparse
             req = urllib2.Request(
-                    urlparse.urlunparse(('http', host, handler, '', '', '')),
+                    urlparse.urlunparse(('https', host, handler, '', '', '')),
                     request_body, {'Content-Type': 'text/xml',
                         'User-Agent': self.user_agent})
             response = self.opener.open(req)



Dima Pasechnik

unread,
Jun 24, 2016, 3:52:21 PM6/24/16
to sage-devel, roed...@gmail.com, erik....@gmail.com


On Friday, June 24, 2016 at 6:23:12 PM UTC+1, Volker Braun wrote:
The error is from the remote side and only echo'ed locally; This is not git-trac's fault but the fault of our git post-receive hook.

Eric, is the post-receive hook still the same as in https://github.com/sagemath/trac-githooks/blob/master/post-receive.d/digest_transport.py? That file needs to have http->https fixed as in 

diff --git a/git_trac/digest_transport_py2.py b/git_trac/digest_transport_py2.py
index 28a8520..c030432 100644
--- a/git_trac/digest_transport_py2.py
+++ b/git_trac/digest_transport_py2.py
@@ -121,7 +121,7 @@ class DigestTransport(object, SafeTransport):
         try:
             import urlparse
             req = urllib2.Request(
-                    urlparse.urlunparse(('http', host, handler, '', '', '')),
+                    urlparse.urlunparse(('https', host, handler, '', '', '')),
                     request_body, {'Content-Type': 'text/xml',
                         'User-Agent': self.user_agent})
             response = self.opener.open(req)

I have just applied this patch by hand, and it has fixed things for me - so I can push, no error messages, the commit gets updated on the trac page (see https://trac.sagemath.org/ticket/20659)

Hopefully it's also fixed git-trac.

Enjoy,
Dima

Travis Scrimshaw

unread,
Jun 25, 2016, 8:47:56 AM6/25/16
to sage-devel, roed...@gmail.com, erik....@gmail.com
On Friday, June 24, 2016 at 2:52:21 PM UTC-5, Dima Pasechnik wrote:


On Friday, June 24, 2016 at 6:23:12 PM UTC+1, Volker Braun wrote:
The error is from the remote side and only echo'ed locally; This is not git-trac's fault but the fault of our git post-receive hook.

Eric, is the post-receive hook still the same as in https://github.com/sagemath/trac-githooks/blob/master/post-receive.d/digest_transport.py? That file needs to have http->https fixed as in 

diff --git a/git_trac/digest_transport_py2.py b/git_trac/digest_transport_py2.py
index 28a8520..c030432 100644
--- a/git_trac/digest_transport_py2.py
+++ b/git_trac/digest_transport_py2.py
@@ -121,7 +121,7 @@ class DigestTransport(object, SafeTransport):
         try:
             import urlparse
             req = urllib2.Request(
-                    urlparse.urlunparse(('http', host, handler, '', '', '')),
+                    urlparse.urlunparse(('https', host, handler, '', '', '')),
                     request_body, {'Content-Type': 'text/xml',
                         'User-Agent': self.user_agent})
             response = self.opener.open(req)

I have just applied this patch by hand, and it has fixed things for me - so I can push, no error messages, the commit gets updated on the trac page (see https://trac.sagemath.org/ticket/20659)


Thank you,
Travis

 

leif

unread,
Jul 3, 2016, 1:35:35 PM7/3/16
to sage-...@googlegroups.com
Erik Bray wrote:
> git and trac should both be back up again.
>
> [...]
>
> Please let me know via e-mail, and also CC
> sagemat...@googlegroups.com if you notice something amiss.

Not that important, so I'm posting here:

What happened to our Trac WikiProcessors [1] (aka syntax highlighting)?

I recall there was some issue displaying /git/ diffs which is fixed now,
but while '#!diff' works on trac pages, e.g. '#!sh' and '#!python' do no
longer work.


-leif

[1] https://trac.sagemath.org/wiki/WikiProcessors#AvailableProcessors


Erik Bray

unread,
Jul 4, 2016, 8:25:42 AM7/4/16
to sage-devel
On Sun, Jul 3, 2016 at 7:35 PM, leif <not.r...@online.de> wrote:
> Erik Bray wrote:
>> git and trac should both be back up again.
>>
>> [...]
>>
>> Please let me know via e-mail, and also CC
>> sagemat...@googlegroups.com if you notice something amiss.
>
> Not that important, so I'm posting here:
>
> What happened to our Trac WikiProcessors [1] (aka syntax highlighting)?
>
> I recall there was some issue displaying /git/ diffs which is fixed now,
> but while '#!diff' works on trac pages, e.g. '#!sh' and '#!python' do no
> longer work.

It may be necessary to install Pygments. I thought that was installed
but I will double-check.
Reply all
Reply to author
Forward
0 new messages