The NodeSquirrel service no longer exists (see #3037038: NodeSquirrel status?), NodeSquirrel integration must be removed from this module. This may be a multi-step process?

Due to an ongoing outage with the NodeSquirrel service since March 1st (#3037038: NodeSquirrel status?) backups using this destination have not worked in two months. Disable NodeSquirrel integration until this problem is resolved.

(Original title: Disable NodeSquirrel integration (D7).)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna created an issue. See original summary.

BrankoC’s picture

The parent issue suggests a work-around exists. Does that mean Nodesquirrel works when the work-around is applied?

In that case killing Nodesquirrel would presumably also kill the work-around?

DamienMcKenna’s picture

The workaround is not recommended because of the security concerns. So yeah, disabling NodeSquirrel integration would skip the workaround.

DamienMcKenna’s picture

Title: Disable NodeSquirrel integration » Disable NodeSquirrel integration (D7)
DamienMcKenna’s picture

If NodeSquirrel ever starts working again we can re-enable it: #3053402: Re-enable NodeSquirrel integration (D7)

BrankoC’s picture

There is an example of disabling B&M 7.x.-x-x functionality in this patch (as yet uncommitted).

I have an ulterior motive in posting this here, because I also want people to review that patch. :-)

DamienMcKenna’s picture

BrankoC’s picture

As the related issue NodeSquirrel status points out, NodeSquirrel has now officially been sunsetted.

NodeSquirrel will stop accepting backups after September 30, 2019.

Backups will no longer be available for download/restore after November 1, 2019.

BrankoC’s picture

This is a simple patch to get things started.

It does three things: 1) comments out NodeSquirrel integration. 2) Creates a warning in the update function. 3) Removes NodeSquirrel references from the tests.

Note that the NodeSquirrel tab will remain visible until the menu cache is rebuilt. Rebuilding the menu cache may be @todo for this issue.

I thought about letting the update function disable schedules that use the NodeSquirrel destination, but that seemed overkill, also considering that the Schedules and Settings tabs neatly remind the user that something is amiss.

The patch addresses the original issue. I expect the issue may change now that the NodeSquirrel service is getting binned by its owners, but I am not familiar enough with the how and what of NodeSquirrel, so I decided to not try and change the issue.

[screenshot of the Settings tab showing error messages]

BrankoC’s picture

Status: Active » Needs review
DamienMcKenna’s picture

Status: Needs review » Needs work

It needs to be a new update script as opposed to a modified existing one.

BrankoC’s picture

I am not sure what you mean by 'update script'. Do you mean that each update should be in its own implementation of hook_update_N()? That is to say, should the code I added in #9 be moved to backup_migrate_update_7308()?

I sort of assumed the last two digits of the function name track the minor version number, although I now see no evidence of this on the API page. The API page does seem to allow for multiple updates within the same function though: "For each change that requires one or more actions to be performed when updating a site, add a new hook_update_N(), which will be called by update.php." (Emphasis mine.)

DamienMcKenna’s picture

Yeah, outside of the first number, hook_update_N()'s numbers are completely arbitrary, the main thing is that a) you don't edit existing ones unless you have specific reason to do so, b) each new item needs to go into a new update script. So yes, this change should go into backup_migrate_update_7308().

BrankoC’s picture

Thank you for the explanation.

Here is a new patch that puts the warning in its own update hook.

BrankoC’s picture

Status: Needs work » Needs review
DamienMcKenna’s picture

Thanks!

BTW there is a convention that the hundreds element of the update number match the branch number, e.g. updates for the 7.x-3.x branch would go into the 73xx range, but it's not a technical requirement and there are plenty of modules that don't follow that. The main one is to have the first number match the core release, but it has been such a long time since I looked that I don't remember if even that is a hard requirement.

DamienMcKenna’s picture

I did some more heavy cutting of references to Nodesquirrel in the module.

I wonder, should we add a hook_requirements() message too?

BrankoC’s picture

Your patch applies well. I no longer see Nodesquirrel links or references, my destinations no longer contain Nodesquirrel nor can I create Nodesquirrel destinations.

Why did you move the update hook info text from a return value to a drupal_set_message() call? Using a return value seems to be standard?

As for hook_requirements(), I have no opinion on whether we should use it here. What were your thoughts on the issue?

I have the feeling that in the realm of back-ups, when to warn and how to warn is a potentially thorny issue that I know too little about.

I assume you don't want to overload users with messages, because they will start tuning them out. And I assume that if you warn users, you want them to take action based on that warning. Especially with automated backup schedules, the user may assume that they are OK for back-ups. If a destination is cancelled, that means the user is relying on back-ups that are no longer being made.

solideogloria’s picture

Looks good to me. Patch and updates apply well, and the NodeSquirrel destination is removed.

I was not using NodeSquirrel, so I don't know what it would be like for someone that had been using it.

DamienMcKenna’s picture

Update script that disables scheduled backups to NodeSquirrel.

DamienMcKenna’s picture

DamienMcKenna’s picture

This removes backup schedules which only used NodeSquirrel, schedules which used Nodesquirrel as a secondary are updated to remove the secondary option, and backups which used NodeSquirrel as their primary and had a secondary will now only use the secondary.

wylbur’s picture

CC Site Test

Tested this patch using an existing Drupal 7 site with an existing Nodesquirrel installation. This included a nodesquirrel backup schedule. To test, I also added a backup script that included nodesquirrel as a secondary backup destination.

- Installed a clean copy of the 3.x-dev version of the module
- Ran update script - which fired the 7308 update script
- Applied the patch #22 - patch applied cleanly with no errors
- Ran update script - which fired the 7309 update script - this deleted the Nodesquirrel backup schedule, and updated the backup script using nodesquirrel as a secondary destination
- Patch and update process was completely successful

Searched the module for any references to nodesquirrel and found none in the codebase.

I'll leave this as Needs Review until I can test on at least one or two other installations.

BrankoC’s picture

Some notes:

1)

+ drupal_set_message(t('The backup schedule named "%backup" as been deleted.', array('%backup' => $name)));

The word 'as' should be 'has'.

2)

+ // Clear the cache so that the NodeSquirrel plugin is no longer loaded.
+ cache_clear_all('*', 'cache', TRUE);

According to this documentation page, running update.php already clears caches. Why do it here? Is this to make the menu rebuild (which follows after the cache_clear_all() call) work?

I applied the patch and it seems to work.

DamienMcKenna’s picture

According to this documentation page, running update.php already clears caches. Why do it here? Is this to make the menu rebuild (which follows after the cache_clear_all() call) work?

Because that's not always true, I've seen some scenarios where it didn't happen, e.g. half of the 7.x-2.x to 7.x-3.x issues were related to caches not being cleared properly. I'll see about refining it slightly.

BrankoC’s picture

Title: Disable NodeSquirrel integration (D7) » Remove NodeSquirrel integration (D7)
Issue summary: View changes

  • DamienMcKenna committed 81d2da0 on 7.x-3.x
    Issue #3051821 by DamienMcKenna, BrankoC, solideogloria, wylbur: Remove...
DamienMcKenna’s picture

Title: Remove NodeSquirrel integration (D7) » Remove NodeSquirrel integration
Status: Needs review » Fixed

Committed. Thank you all.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.