Compaction error: Corruption: block checksum mismatch: expected 862584094, got 1969278739

Currently trying to handle this right on my 3-day memorial weekend 😀

  • Ceph 13.2.4 (Filestore)
  • Rook 0.9
  • Kubernetes 1.14.1

My setup is a Kubernetes cluser with rook handling Ceph. Using 13.2.4, I have this issue with one of my OSDs always restarting. This happened recently. No power failure or anything occurred on the node.

2019-05-25 01:06:07.192 7fb923359700  3 rocksdb: [/home/jenkins-build/build/workspace/ceph-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/huge/release/13.2.4/rpm/el7/BUILD/ceph-13.2.4/src/rocksdb/db/] Compaction error: Corruption: block checksum mismatch: expected 862584094, got 1969278739  in /var/lib/rook/osd1/current/omap/002408.sst offset 15647059 size 3855 

There are a few more in this gist with a similar error message. The only other one states:

2019-05-25 01:06:07.192 7fb939a4a1c0  0 filestore(/var/lib/rook/osd1) EPERM suggests file(s) in osd data dir not owned by ceph user, or leveldb corruption 

I checked this on the node. All is root as the other ones are. It’s also containerized, and deleting the pod to have the operator recreate this did not help.

Only thing I was able to find to assist was, but this seems to be a year old. I am not sure where to begin with this. Any leads or points to some documentation to follow, or a solution if you have one, would be of great help. I see some tools for bluestore, but I do not know how applicable they are and want to be very careful given the situation.

In the worst-case scenario, I have backups. Willing to try things within reason.

Add content of static block as new tab to product detail page

I created 3 static blocks with just a random headline for now, where I want to add html content later.
the ids of the blocks are:

warranty instructions certificates 

I then created 3 .phtml files with content like this ( will jsut add one because they all look the same):

<?php  echo $  this->getLayout()->createBlock('cms/block')->setBlockId('warranty')->toHtml(); 

I placed all the three files in app/design/frontend/rwd/mytheme/template/catalog/product/view

so I have these files lying there:

warranty.phtml instructions.phtml certificates.phtml 

Then I added this in app/design/frontend/rwd/mytheme/layout/local.xml:

<?xml version="1.0"?> <!-- Add more Tabs to Product Details --> <layout>     <catalog_product_view>         <reference name="">             <block type="type="core/template" name="product.warranty" as="warranty" template="catalog/product/view/warranty.phtml">                 <action method="addToParentGroup"><group>detailed_info</group></action>                 <action method="setTitle" translate="value"><value>Garantie</value></action>             </block>             <block type="type="core/template" name="product.instructions" as="instructions" template="catalog/product/view/instructions.phtml">                 <action method="addToParentGroup"><group>detailed_info</group></action>                 <action method="setTitle" translate="value"><value>Anleitung</value></action>             </block>             <block type="type="core/template" name="product.certificates" as="certificates" template="catalog/product/view/certificates.phtml">                 <action method="addToParentGroup"><group>detailed_info</group></action>                 <action method="setTitle" translate="value"><value>Zertifikate</value></action>             </block>         </reference>     </catalog_product_view> </layout> 

It doesn’t work. Nothing showing up on the product pages. There are only the 3 tabs that have already been there before including one that seems to have been added the same way I just tried: (same code in .xml adding blocks to the detailed_info group and linking to a template.phtml file which is then using the same code as I do to call the static block.
But I must be missing some step in between because for me it doesn’t work.

What am I missing?

move block inside another block

I want to put the header.links into another block. this is the icon.phtml file:

<div data-block="dropdown" class="minicart-wrapper">     <i class='fas fa-user-circle action' data-trigger='trigger'></i> </div> 

the menu.phtml file:

<div id="links-menu" class="block block-minicart"      data-mage-init='{         "dropdownDialog": {             "appendTo": "[data-block=dropdown]",             "triggerTarget":"[data-trigger=trigger]",             "timeout": 2000,             "closeOnMouseLeave": false,             "closeOnEscape": true,             "autoOpen": false,             "triggerClass": "active",             "parentClass": "active",             "dialogContentClass": "active",              "buttons": []         }      }'>     content </div> 

This is the layout file:

<referenceContainer name="header-wrapper">     <block class="Magento\Framework\View\Element\Template" name="icon_account" as="icon_account" template="Magento_Customer::/icon/icon.phtml"/>     <block class="Magento\Framework\View\Element\Template" name="links-menu" as="links-menu" template="Magento_Customer::/menu/menu.phtml"/> </referenceContainer>  <move element="header.links" destination="links-menu"/>  

The problem is that the header.links are not into the desired destination. How can I fix it?

How to center a block on a page?

I have a block with a visual menu in it and I want to show up centered on the page. This is my css within the block:

.container{ margin: 0 auto; text-align:center; } 

I’ve also tried to put the widget when inserted into the page inside a centered div:

<div style="text-align: center;" > {{widget type="Magento\Cms\Block\Widget\Block" template="widget/static_block/default.phtml" block_id="38" type_name="CMS Static Block"}} </div> 

What else can I do to center it?

Pass values from a block to a text field (in simplenews subscription block)

I am using the subscription block of the simplenews module, in a custom module through a hook i added a new text field to the simplenews configuration block. My intention is to be able to add a custom placeholder to the text field of each subscription block.

At the time of using the twig template i can access this value in the block template, but i can not find a way to pass it below and i can print it in the template of the text field.


Adding the field to the simplenews block

    function my_module_form_block_form_alter(&$  form, FormStateInterface $  form_state, $  form_id) {        /** @var \Drupal\block\Entity\Block $  block */       $  block = $  form_state->getFormObject()->getEntity();       if ($  block->getPlugin()->getPluginId() == "simplenews_subscription_block") {         $  form['third_party_settings']['#tree'] = TRUE;         $  form['third_party_settings']['my_module']['placeholder'] = [           '#type' => 'textfield',           '#title' => t('Custom placeholder'),           '#description' => t('Custom Placeholder.'),           '#default_value' => $  block->getThirdPartySetting('my_module', 'placeholder'),           '#weight' => 1,         ];       }      } 

Passing values to the block template.

function my_module_preprocess_block(&$  variables) {   $  elements = $  variables["elements"];   if (isset($  elements["#plugin_id"]) && $  elements["#plugin_id"] == "simplenews_subscription_block"){     $  block = Block::load($  elements["#id"]);     if ($  block && $  placeholder = $  block->getThirdPartySetting("my_module","placeholder")) {       $  variables["configuration"]["placeholder"] = $  placeholder;     }   } } 

From here on i do not know how i can pass the placeholder value to the text field template and print it as an attribute or in some way.


New block watcher

guys. I need to create bitcoin watcher, which will subscribe to new block event of bitcoin node and make some operations with mined transactions. For starting node I use bitcoind -testnet -datadir=/home/ubuntu/bitcoin/ -rpcuser=user -rpcpassword=password And use it in Node.js via library Bitcoin core I found only one way to interact with new block event: here the solution. But it was answer for five years ago. I hope that it can be much better solution for subscribing for new blocks without using bcoin or else frameworks, which work with own nodes and doesn’t have possibility to connect to external node via link. I would be able to use Node.js v10.12

Cannot define anything in publishing block of build.gradle

I’m trying to create a library and publish it to maven local. When I start trying to add a MavenPublication to publications, the IDE gives it a dotted underline like it’s and unresolved reference. Same with parameters like from and artifact.

If I uncomment the pom block, gradle sync fails and says Cause: invalid type code: B3, ultimately because of org.gradle.internal.metaobject.AbstractDynamicObject$ CustomMessageMissingMethodException on one of the parameters within.

IntelliJ Idea screen shot

This build.gradle file is in one of my modules. The top level build.gradle is pretty simple.

buildscript {      repositories {         mavenLocal()         mavenCentral()         maven { url "" }         maven { url "" }         jcenter()     }     dependencies {      } }  allprojects {     apply plugin: "idea"      group = 'com.mygroup'     version = '1.0.0'      repositories {         mavenLocal()         mavenCentral()         jcenter()         maven { url "" }         maven { url "" }     } } 

I’m using Gradle 5.1.1.

multiple view block by term that list node title tagged with child term

I want to display a view where multiple block are specific to first level term of a vocabulary and that it list all the node tagged with all the child term of that term with deep.

I could create each block manualy and apply a term filter, but id like a view to create all the block automaticaly . Is it possible or i have to create custom code in the theme?