Archive to Box: Button that clears one/all exceptions

Bug #1583196 reported by Paul Everitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KARL4
Fix Released
Medium
Carlos de la Guardia

Bug Description

tl;dr Archive to Box puts an error in Redis when something goes wrong. We need a way to clear that error and resume processing. Even better, also prevent that error from occurring. Either a button on each exception-status community, or a button to clear all exceptions.

Archive to Box
====================

We have a system that allows us to dump the contents of a community and transmit it to Box for archiving. Once in Box, we de-activate the community.

In the implementation, KarlAdmin marks a community as flagged for archiving. A separate process does the work to serialize each resource and copy it over to Box. When that's successful, KarlAdmin then clicks to archive the community, which removes the content, puts a stub comment on the community home page, removes everybody as members of that community, unindexes it, etc.

Redis is used to store information between the archiving process and the KARL UI.

Lots on this implementation in Launchpad bug comments.

admin5
=============

Redis is the first curveball. As the second curveball, this is driven by an Angular admin UI called "admin5". From your perspective, it just means...we have a JSON-oriented API. Hopefully you can fix this issue purely by dealing with REST.

You can reach this admin5 UI at:

  https://karl.soros.org/admin5/#/admin/archive_box

If the Box login token expires, Nat has to go back in and login.

If you Filter for communities older than 900 days, you should see "Youth Initiative Advisory Board" in the "exception" status.

Box
==========

The second curveball is....Box. Getting a security token for Box and storing it for the console script to use it a bit unusual as a workflow. Fortunately, for this bug, you don't have to worry about it.

Exception Status
====================

For some communities, KarlAdmin clicks "Archive", then after a while, an "exception" status is displayed for that community. Once in an exception status, a manual step has to be done to fix it.

The "exception" status comes from an attribute "archive_status" that is
stored on the community. I have a script on osfkarl10 in the osfkarl user's
home directory (clear_exception.py) which I run to wipe all exceptions.

What To Do
================

To diagnose:

- Log into osfkarl10

- Look in the various log directories for the current KARL (production/current/var/log) and previous KARLs (production/79/var/log, production/78/var/log, etc.)

- arc2box has log files (and gzip'd files) as arc2box.log and arc2box.log-date.gz

- Look for the exceptions. Half seem to be when FlyingCircus messed up the redis setup, and half seem to be when Box isn't reachable

- We don't seem to have had a serialization problem recently

Foremost, we need a way to clear the exception status. As an immediate step, learn how to find the correct key in Redis and clear it. Then, confirm that "Youth Initiative Advisory Board" is now out of the "exception" status.

Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Carlos has already made progress on getting up to speed on arc2box. I changed this ticket to be specifically about clearing the "archive_status='exception'" attribute on each community.

summary: - Archive to Box: Clear expired and investigate unicode error
+ Archive to Box: Button that clears one/all exceptions
description: updated
Changed in karl4:
milestone: 019 → 021
Revision history for this message
Carlos de la Guardia (cguardia) wrote :

To make this a button, I need to change the js code. Or I can add API calls that you can use from there?

Changed in karl4:
status: New → In Progress
Revision history for this message
Paul Everitt (paul-agendaless) wrote : Re: [Bug 1583196] Re: Archive to Box: Button that clears one/all exceptions
Download full text (3.8 KiB)

I will work on the button today. Can you work on the REST API?

—Paul

> On Jul 29, 2016, at 4:24 AM, Carlos de la Guardia <email address hidden> wrote:
>
> To make this a button, I need to change the js code. Or I can add API
> calls that you can use from there?
>
> ** Changed in: karl4
> Status: New => In Progress
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1583196
>
> Title:
> Archive to Box: Button that clears one/all exceptions
>
> Status in KARL4:
> In Progress
>
> Bug description:
> tl;dr Archive to Box puts an error in Redis when something goes wrong.
> We need a way to clear that error and resume processing. Even better,
> also prevent that error from occurring. Either a button on each
> exception-status community, or a button to clear all exceptions.
>
> Archive to Box
> ====================
>
> We have a system that allows us to dump the contents of a community
> and transmit it to Box for archiving. Once in Box, we de-activate the
> community.
>
> In the implementation, KarlAdmin marks a community as flagged for
> archiving. A separate process does the work to serialize each resource
> and copy it over to Box. When that's successful, KarlAdmin then clicks
> to archive the community, which removes the content, puts a stub
> comment on the community home page, removes everybody as members of
> that community, unindexes it, etc.
>
> Redis is used to store information between the archiving process and
> the KARL UI.
>
> Lots on this implementation in Launchpad bug comments.
>
> admin5
> =============
>
> Redis is the first curveball. As the second curveball, this is driven
> by an Angular admin UI called "admin5". From your perspective, it just
> means...we have a JSON-oriented API. Hopefully you can fix this issue
> purely by dealing with REST.
>
> You can reach this admin5 UI at:
>
> https://karl.soros.org/admin5/#/admin/archive_box
>
> If the Box login token expires, Nat has to go back in and login.
>
> If you Filter for communities older than 900 days, you should see
> "Youth Initiative Advisory Board" in the "exception" status.
>
> Box
> ==========
>
> The second curveball is....Box. Getting a security token for Box and
> storing it for the console script to use it a bit unusual as a
> workflow. Fortunately, for this bug, you don't have to worry about it.
>
> Exception Status
> ====================
>
> For some communities, KarlAdmin clicks "Archive", then after a while,
> an "exception" status is displayed for that community. Once in an
> exception status, a manual step has to be done to fix it.
>
> The "exception" status comes from an attribute "archive_status" that is
> stored on the community. I have a script on osfkarl10 in the osfkarl user's
> home directory (clear_exception.py) which I run to wipe all exceptions.
>
> What To Do
> ================
>
> To diagnose:
>
> - Log into osfkarl10
>
> - Look in the various log directories for the current KARL
> (production/current/var/log) and previous KARLs
> (production/79/var/log, production/78/var/log, etc.)
>
> ...

Read more...

Revision history for this message
Paul Everitt (paul-agendaless) wrote : Re: [Bug 1583196] Archive to Box: Button that clears one/all exceptions
Download full text (3.7 KiB)

Let’s go with:

  /arc2box/clear_exceptions

—Paul

> On Jul 29, 2016, at 4:24 AM, Carlos de la Guardia <email address hidden> wrote:
>
> To make this a button, I need to change the js code. Or I can add API
> calls that you can use from there?
>
> ** Changed in: karl4
> Status: New => In Progress
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1583196
>
> Title:
> Archive to Box: Button that clears one/all exceptions
>
> Status in KARL4:
> In Progress
>
> Bug description:
> tl;dr Archive to Box puts an error in Redis when something goes wrong.
> We need a way to clear that error and resume processing. Even better,
> also prevent that error from occurring. Either a button on each
> exception-status community, or a button to clear all exceptions.
>
> Archive to Box
> ====================
>
> We have a system that allows us to dump the contents of a community
> and transmit it to Box for archiving. Once in Box, we de-activate the
> community.
>
> In the implementation, KarlAdmin marks a community as flagged for
> archiving. A separate process does the work to serialize each resource
> and copy it over to Box. When that's successful, KarlAdmin then clicks
> to archive the community, which removes the content, puts a stub
> comment on the community home page, removes everybody as members of
> that community, unindexes it, etc.
>
> Redis is used to store information between the archiving process and
> the KARL UI.
>
> Lots on this implementation in Launchpad bug comments.
>
> admin5
> =============
>
> Redis is the first curveball. As the second curveball, this is driven
> by an Angular admin UI called "admin5". From your perspective, it just
> means...we have a JSON-oriented API. Hopefully you can fix this issue
> purely by dealing with REST.
>
> You can reach this admin5 UI at:
>
> https://karl.soros.org/admin5/#/admin/archive_box
>
> If the Box login token expires, Nat has to go back in and login.
>
> If you Filter for communities older than 900 days, you should see
> "Youth Initiative Advisory Board" in the "exception" status.
>
> Box
> ==========
>
> The second curveball is....Box. Getting a security token for Box and
> storing it for the console script to use it a bit unusual as a
> workflow. Fortunately, for this bug, you don't have to worry about it.
>
> Exception Status
> ====================
>
> For some communities, KarlAdmin clicks "Archive", then after a while,
> an "exception" status is displayed for that community. Once in an
> exception status, a manual step has to be done to fix it.
>
> The "exception" status comes from an attribute "archive_status" that is
> stored on the community. I have a script on osfkarl10 in the osfkarl user's
> home directory (clear_exception.py) which I run to wipe all exceptions.
>
> What To Do
> ================
>
> To diagnose:
>
> - Log into osfkarl10
>
> - Look in the various log directories for the current KARL
> (production/current/var/log) and previous KARLs
> (production/79/var/log, production/78/var/log, etc.)
>
> - arc2box has log ...

Read more...

Revision history for this message
Paul Everitt (paul-agendaless) wrote :
Download full text (7.6 KiB)

I *think* I have a button ready. Do this on osfkarl11/12:

- bin/develop co admin5
- bin/buildout
- restart
- go to https://karl.soros.org/admin5/#/admin/archive_box <https://karl.soros.org/admin5/#/admin/archive_box>
- Look for a button under “Filter” for “Clear Exceptions"

—Paul

> On Jul 29, 2016, at 8:29 AM, Paul Everitt <email address hidden> wrote:
>
> I will work on the button today. Can you work on the REST API?
>
> —Paul
>
>> On Jul 29, 2016, at 4:24 AM, Carlos de la Guardia <email address hidden> wrote:
>>
>> To make this a button, I need to change the js code. Or I can add API
>> calls that you can use from there?
>>
>> ** Changed in: karl4
>> Status: New => In Progress
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1583196
>>
>> Title:
>> Archive to Box: Button that clears one/all exceptions
>>
>> Status in KARL4:
>> In Progress
>>
>> Bug description:
>> tl;dr Archive to Box puts an error in Redis when something goes wrong.
>> We need a way to clear that error and resume processing. Even better,
>> also prevent that error from occurring. Either a button on each
>> exception-status community, or a button to clear all exceptions.
>>
>> Archive to Box
>> ====================
>>
>> We have a system that allows us to dump the contents of a community
>> and transmit it to Box for archiving. Once in Box, we de-activate the
>> community.
>>
>> In the implementation, KarlAdmin marks a community as flagged for
>> archiving. A separate process does the work to serialize each resource
>> and copy it over to Box. When that's successful, KarlAdmin then clicks
>> to archive the community, which removes the content, puts a stub
>> comment on the community home page, removes everybody as members of
>> that community, unindexes it, etc.
>>
>> Redis is used to store information between the archiving process and
>> the KARL UI.
>>
>> Lots on this implementation in Launchpad bug comments.
>>
>> admin5
>> =============
>>
>> Redis is the first curveball. As the second curveball, this is driven
>> by an Angular admin UI called "admin5". From your perspective, it just
>> means...we have a JSON-oriented API. Hopefully you can fix this issue
>> purely by dealing with REST.
>>
>> You can reach this admin5 UI at:
>>
>> https://karl.soros.org/admin5/#/admin/archive_box
>>
>> If the Box login token expires, Nat has to go back in and login.
>>
>> If you Filter for communities older than 900 days, you should see
>> "Youth Initiative Advisory Board" in the "exception" status.
>>
>> Box
>> ==========
>>
>> The second curveball is....Box. Getting a security token for Box and
>> storing it for the console script to use it a bit unusual as a
>> workflow. Fortunately, for this bug, you don't have to worry about it.
>>
>> Exception Status
>> ====================
>>
>> For some communities, KarlAdmin clicks "Archive", then after a while,
>> an "exception" status is displayed for that community. Once in an
>> exception status, a manual step has to be done to fix it.
>>
>> The "exception" status comes from an attribute "archive_status" that is
>> stored on...

Read more...

Revision history for this message
Carlos de la Guardia (cguardia) wrote :

Ok, my plan is to go through all exceptions like you did, but I need to do further checking to see if the exception happened during copy or mothballing. Might need to modify archive a bit.

Changed in karl4:
milestone: 021 → 022
Changed in karl4:
milestone: 022 → 023
Changed in karl4:
milestone: 023 → 024
Changed in karl4:
milestone: 024 → 026
Changed in karl4:
milestone: 026 → 029
Revision history for this message
Carlos de la Guardia (cguardia) wrote :

This led to a completely different way of handling exceptions.

Changed in karl4:
status: In Progress → Fix Committed
Changed in karl4:
milestone: 029 → 030
Changed in karl4:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.