Comments for J.Lo's Tech Blog https://blog.starbyte.co.uk Should be a notepad Thu, 27 Jan 2022 13:46:11 +0000 hourly 1 Comment on Raspberry PI + GlusterFS (Part 4) by JD https://blog.starbyte.co.uk/raspberry-pi-glusterfs-part-4/#comment-683 Thu, 27 Jan 2022 13:46:11 +0000 http://blog.starbyte.co.uk/raspberry-pi-glusterfs-part-4/#comment-683 In reply to gordon.

Hi Gordon,
Unfortunately no more posts on it. I can't really remember playing with it lol my memory isn't the greatest which I why I try to document things I think I may need to go back to.
I do know that I didn't end up using GlusterFS and a few years ago did a similar setup with MooseFS using 7xPI4's. I like Moose in the sense you can you different drives (size wise) and it just seemed all around easier. The downsides however, as a free user your reliant on a single live meta server (I did enquire about a price for pro but they never got back to me) and because it stores the files in it's own way if something goes wrong you can't just go and grab the files from ext4/xfs like you could with a gluster system (I believe). The PI's still aren't upto the task of mass storage imo, it's workable, I was using MooseFS as a 30TB backup for other drives and it just took longer to copy stuff in and then sync up. However out of 6 disks 3 failed! They were all brand new disks and are currently with WD (hitting 3 months) waiting on replacements (that remind me I need to go shout at them again this month). Sadly I had important files set at 3 copies and less important to 2 copies. With 3 disk failures, it was just too much and I wrote off all the data (thankfully it was just backups). I think the system itself tried to do what it should, i.e disk 1 failed so the chunks it's holding are now below the target 2 or 3, so Moose started copying the endangered chunks to other disks, but this then hit a problem on disk #2 which died. Any files set to 2 copies that were on disks 1 & 2 at this point were lost. Files with 3 copies still had a chance, but then disk #3 died so any files with chunks only on disk 1, 2 & 3 were lost at this point.
I semi take the blame here, because I was testing stuff I didn't setup any alerts or monitoring. The problems started about a month before I checked it.
I think if the PI's could handle decent transfer speeds then it may have been able to get things back in sync before #2 and then #3 failed. It looks like it had been days/weeks syncing stuff. Ultimately the drives shouldn't have failed, they were all new and spent about 95% of their time doing hardly anything.

It's something I hope to revisit as I really do need to sort some kind of large shared storage (cheap) but no plans to atm.
I'd be interested to hear how you got on with GlusterFS though. I tried it years ago as a backend to multiple webservers. The idea being that each server would be part of gluster holding a copy of the files, so the webserver only had to go locally but chances would be automatically sync'd etc. but encountered problems as the servers decided to speak to each other to get the files and I couldn't see an easy way of saying Server A gets files from Server A first then any other if A not available. I ended up with A getting files from A,B,C,D and just all around increasing network traffic. Day to day that would be fine but when in the middle of a traffic spike it just ground it all to a halt.

]]>
Comment on Raspberry PI + GlusterFS (Part 4) by gordon https://blog.starbyte.co.uk/raspberry-pi-glusterfs-part-4/#comment-666 Sat, 23 Oct 2021 20:10:10 +0000 http://blog.starbyte.co.uk/raspberry-pi-glusterfs-part-4/#comment-666 interesting reading 🙂 thanks for posting.

I am playing around with GlusterFS and RPis just now.. installing GlusterFS is easier.

No more linked posts, I would be curious to hear any updates.

]]>
Comment on WooCommerce API: No order data specified to edit order by Syed https://blog.starbyte.co.uk/woocommerce-api-no-order-data-specified-to-edit-order/#comment-561 Sun, 26 Apr 2020 11:53:47 +0000 http://blog.starbyte.co.uk/?p=195#comment-561 Thankyou soooo much…. this error had made me soo frustrated….. Thankyou works like a charm

]]>
Comment on Asterisk UK Caller ID by jorge https://blog.starbyte.co.uk/asterisk-uk-caller-id/#comment-555 Sat, 25 May 2019 10:53:24 +0000 http://blog.starbyte.co.uk/asterisk-uk-caller-id/#comment-555 Good Job Mine still caller Id unknown

]]>
Comment on WooCommerce API: No order data specified to edit order by JD https://blog.starbyte.co.uk/woocommerce-api-no-order-data-specified-to-edit-order/#comment-519 Mon, 29 Oct 2018 11:02:42 +0000 http://blog.starbyte.co.uk/?p=195#comment-519 In reply to Scotty.

I'm really glad it's helped someone (a few people looking at the replies), it's that long ago I can't remember writing it 🙂

]]>
Comment on WooCommerce 3.3.0+ by JD https://blog.starbyte.co.uk/woocommerce-3-3-0/#comment-518 Mon, 29 Oct 2018 10:57:13 +0000 https://blog.starbyte.co.uk/?p=234#comment-518 In reply to szabesz.

Hi Szabesz,

Sorry for replying almost 8 months late, I really need to fix my email notifications from the blog 🙂

I fixed the email address issue with the following:
<code>
function bit_wc_columns_add_email( $column_name, $post_id ) {
// Based on solution from https://gist.github.com/LWS-Web/869e41c543ae91ead550828929578c7e
// Adjusted to incorporate into this plugin, and changed from display:block as the text wasn't selectable in block.
// Get an instance of the WC_Order object
$order = wc_get_order( $post_id );
// Get the Order data
$order_data = $order->get_data();
// Get the billing mailadress from the order data
$order_billing_email = $order_data['billing']['email'];
// Add content to default column "order_number"
if ($column_name == 'order_number') {
echo '<small class="meta email"><a href="' . esc_url( 'mailto:' . $order_billing_email ) . '">' . esc_html( $order_billing_email ) . '</a></small>';
}
}
add_action( 'manage_shop_order_posts_custom_column', 'bit_wc_columns_add_email', 11, 2 );
</code>
That's in a plugin I made (for internal use, not public/published) fixing all kinds of random bits for us.

Of other 2 issues:
I spent some time looking at restoring the icons, while I certainly believe it's possible it felt like something that would most likely break with every update of WooCommerce so I stopped working on that one and we just live with the change.
The Date column, I spent days trying to figure out. According to the dev it should be an easy one to change formatting on the date. But what I found is that it's not, there's certainly formatting when it looks like '2018/10/28 08:32' and that can be changed, but when it looks like '12 hours ago' it uses something completely different. I still haven't fixed it, it's one of the most annoying things but we've just got in the habit of refresh the orders page no matter when you think you last did it to make sure it's upto date info.
If I do ever fix either I'll update the post.

ps. Sorry for the language in the post (I read it back today), I was certainly very annoyed at the UI changes at the time. I still am really, it's been almost 8 months I've used the quick view function a total of 2 times and both times ended up having to open the order because quick view didn't show the basic info I needed. I've just asked and no-one else uses the quick view either, for us the most important bit was having the email address visible.

I do recommend that anyone fixing these issues also feed back to the WooCommerce devs, in my opinion these changes all look lovely on paper but can have a big impact on actual stores. I'm sure there's people out there who love the changes and that's fine. but I see no reason why it shouldn't have been developed a little more into say a few screen options (email address on/off, quickview on/of, order line clickable on/off, status icons/text etc etc), at least giving store owners an easier way to get back to the layout that works for them. The whole attitude of 'we know best' needs slapping out of them.

If you've managed to fix either the icons and/or date field let me know how 🙂

]]>
Comment on WooCommerce API: No order data specified to edit order by Scotty https://blog.starbyte.co.uk/woocommerce-api-no-order-data-specified-to-edit-order/#comment-479 Fri, 29 Jun 2018 19:35:59 +0000 http://blog.starbyte.co.uk/?p=195#comment-479 Wow, thanks! Here it is 2 years later, and the WooCommerce docs still haven't been fixed. Your blog post probably saved me hours of digging.

]]>
Comment on WooCommerce 3.3.0+ by szabesz https://blog.starbyte.co.uk/woocommerce-3-3-0/#comment-463 Thu, 01 Mar 2018 14:10:56 +0000 https://blog.starbyte.co.uk/?p=234#comment-463 Hi,

Thanks for sharing these snippets and solutions! I'am in the very same boat, trying to revert the changes as much as possible.

Could you please post solutions to other leftover issues you have solved since then?

Thanks in advance!

]]>
Comment on Redis Sentinel PHP Session Handler by JD https://blog.starbyte.co.uk/redis-sentinel-php-session-handler/#comment-441 Thu, 11 Jan 2018 04:07:02 +0000 http://blog.starbyte.co.uk/?p=169#comment-441 In reply to Jo Goossens.

Hi Jo,
Never be sorry to comment 🙂

To be perfectly honest, I don't know. This was in place some time ago and I don't really remember it. I can vaguely recall setting up our monitoring system to be able to move certain Master services around automatically for failure, maintenance and expected spikes. I would guess there was some bigger reason to script redis with this in mind. but really not sure.
We've since moved to a hosted platform, but it's not quite worked out as planned (hassle free and able to quickly expand to handle big sudden traffic spikes). We're rebuilding from scratch now we have an even better idea of what sorts of spikes to expect. I'll certainly be looking at HAProxy within this new setup.

]]>
Comment on Redis Sentinel PHP Session Handler by Jo Goossens https://blog.starbyte.co.uk/redis-sentinel-php-session-handler/#comment-404 Mon, 03 Jul 2017 14:11:55 +0000 http://blog.starbyte.co.uk/?p=169#comment-404 Hi,

Sorry to comment, while this may work I really wonder why not use haproxy like explained here:

http://www.haproxy.com/blog/haproxy-advanced-redis-health-check/

]]>